Skip to content

Commit 79da563

Browse files
committed
patch 8.0.0294: argument list is not stored correctly in a session file
Problem: Argument list is not stored correctly in a session file. (lgpasquale) Solution: Use "$argadd" instead of "argadd". (closes #1434)
1 parent e5f2a07 commit 79da563

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/ex_docmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11790,7 +11790,7 @@ ses_arglist(
1179011790
s = buf;
1179111791
}
1179211792
}
11793-
if (fputs("argadd ", fd) < 0
11793+
if (fputs("$argadd ", fd) < 0
1179411794
|| ses_put_fname(fd, s, flagp) == FAIL
1179511795
|| put_eol(fd) == FAIL)
1179611796
{

src/testdir/test_mksession.vim

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,16 @@ func Test_mksession_winheight()
110110
call delete('Xtest_mks.out')
111111
endfunc
112112

113+
func Test_mksession_arglist()
114+
argdel *
115+
next file1 file2 file3 file4
116+
mksession! Xtest_mks.out
117+
source Xtest_mks.out
118+
call assert_equal(['file1', 'file2', 'file3', 'file4'], argv())
119+
120+
call delete('Xtest_mks.out')
121+
argdel *
122+
endfunc
123+
124+
113125
" vim: shiftwidth=2 sts=2 expandtab

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
294,
767769
/**/
768770
293,
769771
/**/

0 commit comments

Comments
 (0)