0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.4.205

Problem:    ":mksession" writes command to move to second argument while it
            does not exist.  When it does exist the order might be wrong.
Solution:   Use ":argadd" for each argument instead of using ":args" with a
            list of names. (Nobuhiro Takasaki)
This commit is contained in:
Bram Moolenaar 2014-03-12 21:28:26 +01:00
parent 1d9ff43f58
commit f0bdd2f28d
2 changed files with 10 additions and 6 deletions

View File

@ -10381,7 +10381,7 @@ makeopens(fd, dirnow)
} }
/* the global argument list */ /* the global argument list */
if (ses_arglist(fd, "args", &global_alist.al_ga, if (ses_arglist(fd, "argglobal", &global_alist.al_ga,
!(ssop_flags & SSOP_CURDIR), &ssop_flags) == FAIL) !(ssop_flags & SSOP_CURDIR), &ssop_flags) == FAIL)
return FAIL; return FAIL;
@ -10955,9 +10955,9 @@ ses_arglist(fd, cmd, gap, fullname, flagp)
char_u *buf = NULL; char_u *buf = NULL;
char_u *s; char_u *s;
if (gap->ga_len == 0) if (fputs(cmd, fd) < 0 || put_eol(fd) == FAIL)
return put_line(fd, "silent! argdel *"); return FAIL;
if (fputs(cmd, fd) < 0) if (put_line(fd, "silent! argdel *") == FAIL)
return FAIL; return FAIL;
for (i = 0; i < gap->ga_len; ++i) for (i = 0; i < gap->ga_len; ++i)
{ {
@ -10974,7 +10974,9 @@ ses_arglist(fd, cmd, gap, fullname, flagp)
s = buf; s = buf;
} }
} }
if (fputs(" ", fd) < 0 || ses_put_fname(fd, s, flagp) == FAIL) if (fputs("argadd ", fd) < 0
|| ses_put_fname(fd, s, flagp) == FAIL
|| put_eol(fd) == FAIL)
{ {
vim_free(buf); vim_free(buf);
return FAIL; return FAIL;
@ -10982,7 +10984,7 @@ ses_arglist(fd, cmd, gap, fullname, flagp)
vim_free(buf); vim_free(buf);
} }
} }
return put_eol(fd); return OK;
} }
/* /*

View File

@ -738,6 +738,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
205,
/**/ /**/
204, 204,
/**/ /**/