summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0789
blob: f98b1d49670f596e4a0040fe213a56e317e88814 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
To: vim_dev@googlegroups.com
Subject: Patch 8.1.07
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0789
Problem:    Sourcing a session sets v:errmsg.
Solution:   Use "%argdel" instead of "argdel *". (Jason Franklin)
Files:	    src/ex_docmd.c, src/testdir/test_mksession.vim


*** ../vim-8.1.0788/src/ex_docmd.c	2019-01-20 15:30:36.881328770 +0100
--- src/ex_docmd.c	2019-01-21 23:00:28.824309250 +0100
***************
*** 12007,12013 ****
  
      if (fputs(cmd, fd) < 0 || put_eol(fd) == FAIL)
  	return FAIL;
!     if (put_line(fd, "silent! argdel *") == FAIL)
  	return FAIL;
      for (i = 0; i < gap->ga_len; ++i)
      {
--- 12007,12013 ----
  
      if (fputs(cmd, fd) < 0 || put_eol(fd) == FAIL)
  	return FAIL;
!     if (put_line(fd, "%argdel") == FAIL)
  	return FAIL;
      for (i = 0; i < gap->ga_len; ++i)
      {
*** ../vim-8.1.0788/src/testdir/test_mksession.vim	2019-01-12 16:29:26.327986331 +0100
--- src/testdir/test_mksession.vim	2019-01-21 22:58:26.369496042 +0100
***************
*** 415,418 ****
--- 415,430 ----
    %bwipe
  endfunc
  
+ " A clean session (one empty buffer, one window, and one tab) should not
+ " set any error messages when sourced because no commands should fail.
+ func Test_mksession_no_errmsg()
+   let v:errmsg = ''
+   %bwipe!
+   mksession! Xtest_mks.out
+   source Xtest_mks.out
+   call assert_equal('', v:errmsg)
+   call delete('Xtest_mks.out')
+ endfunc
+ 
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.1.0788/src/version.c	2019-01-20 23:43:54.314830624 +0100
--- src/version.c	2019-01-21 22:59:43.068749672 +0100
***************
*** 793,794 ****
--- 793,796 ----
  {   /* Add new patch number below this line */
+ /**/
+     789,
  /**/

-- 
MAN:    Fetchez la vache!
GUARD:  Quoi?
MAN:    Fetchez la vache!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///