mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.0789: session sets v:errmsg #10553
Problem: Sourcing a session sets v:errmsg.
Solution: Use "%argdel" instead of "argdel *". (Jason Franklin)
555de4e3b2
This commit is contained in:
parent
b764120ee7
commit
d20bbc8022
@ -9587,7 +9587,7 @@ ses_arglist(
|
|||||||
if (fputs(cmd, fd) < 0 || put_eol(fd) == FAIL) {
|
if (fputs(cmd, fd) < 0 || put_eol(fd) == FAIL) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
if (put_line(fd, "silent! argdel *") == FAIL) {
|
if (put_line(fd, "%argdel") == FAIL) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < gap->ga_len; ++i) {
|
for (int i = 0; i < gap->ga_len; ++i) {
|
||||||
|
@ -238,6 +238,17 @@ func Test_mkview_no_file_name()
|
|||||||
%bwipe
|
%bwipe
|
||||||
endfunc
|
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()
|
func Test_mksession_quote_in_filename()
|
||||||
if !has('unix')
|
if !has('unix')
|
||||||
" only Unix can handle this weird filename
|
" only Unix can handle this weird filename
|
||||||
|
Loading…
Reference in New Issue
Block a user