1
0
forked from aniani/vim

patch 8.2.2650: Vim9: command modifiers not handled in nested function

Problem:    Vim9: command modifiers not handled in nested function.
Solution:   Keep function-local info in a structure and save it on the stack.
This commit is contained in:
Bram Moolenaar
2021-03-24 22:00:56 +01:00
parent 1ff89deeaa
commit 2fecb53115
4 changed files with 127 additions and 45 deletions

View File

@@ -2363,6 +2363,29 @@ def Test_cmdmod_silent_restored()
delete(fname)
enddef
def Test_cmdmod_silent_nested()
var lines =<< trim END
vim9script
var result = ''
def Error()
result ..= 'Eb'
eval [][0]
result ..= 'Ea'
enddef
def Crash()
result ..= 'Cb'
sil! Error()
result ..= 'Ca'
enddef
Crash()
assert_equal('CbEbEaCa', result)
END
CheckScriptSuccess(lines)
enddef
def Test_dict_member_with_silent()
var lines =<< trim END
vim9script