mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.1.0789: sourcing a session sets v:errmsg
Problem: Sourcing a session sets v:errmsg. Solution: Use "%argdel" instead of "argdel *". (Jason Franklin)
This commit is contained in:
@@ -12007,7 +12007,7 @@ ses_arglist(
|
||||
|
||||
if (fputs(cmd, fd) < 0 || put_eol(fd) == FAIL)
|
||||
return FAIL;
|
||||
if (put_line(fd, "silent! argdel *") == FAIL)
|
||||
if (put_line(fd, "%argdel") == FAIL)
|
||||
return FAIL;
|
||||
for (i = 0; i < gap->ga_len; ++i)
|
||||
{
|
||||
|
@@ -415,4 +415,16 @@ func Test_mkview_no_file_name()
|
||||
%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
|
||||
|
@@ -791,6 +791,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
789,
|
||||
/**/
|
||||
788,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user