forked from aniani/vim
patch 8.2.2386: Vim9: crash when using ":silent! put"
Problem: Vim9: crash when using ":silent! put".
Solution: When ignoring an error for ":silent!" rewind the stack and skip
ahead to restoring the cmdmod. (closes #7717)
This commit is contained in:
@@ -2184,6 +2184,24 @@ def Test_dict_member_with_silent()
|
||||
CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
def Test_skip_cmds_with_silent()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
|
||||
def Func(b: bool)
|
||||
Crash()
|
||||
enddef
|
||||
|
||||
def Crash()
|
||||
sil! :/not found/d _
|
||||
sil! :/not found/put _
|
||||
enddef
|
||||
|
||||
Func(true)
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
def Test_opfunc()
|
||||
nnoremap <F3> <cmd>set opfunc=Opfunc<cr>g@
|
||||
def g:Opfunc(_: any): string
|
||||
|
||||
Reference in New Issue
Block a user