diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_docmd.c | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_mksession.vim | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 7a06d19a19..081ca8bf8e 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -9587,7 +9587,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 (int i = 0; i < gap->ga_len; ++i) { diff --git a/src/nvim/testdir/test_mksession.vim b/src/nvim/testdir/test_mksession.vim index 7c5b95ae96..d77dac69c7 100644 --- a/src/nvim/testdir/test_mksession.vim +++ b/src/nvim/testdir/test_mksession.vim @@ -238,6 +238,17 @@ 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 + func Test_mksession_quote_in_filename() if !has('unix') " only Unix can handle this weird filename |