1
0
forked from aniani/vim

patch 8.2.2021: Vim9: get E1099 when autocommand resets did_emsg

Problem:    Vim9: get E1099 when autocommand resets did_emsg.
Solution:   Add did_emsg_cumul. (closes #7336)
This commit is contained in:
Bram Moolenaar
2020-11-20 19:26:48 +01:00
parent bebaa0d5c0
commit eeece9e488
5 changed files with 37 additions and 9 deletions

View File

@@ -1704,5 +1704,19 @@ def Test_block_scoped_var()
CheckScriptSuccess(lines)
enddef
def Test_reset_did_emsg()
var lines =<< trim END
@s = 'blah'
au BufWinLeave * #
def Func()
var winid = popup_create('popup', {})
exe '*s'
popup_close(winid)
enddef
Func()
END
CheckScriptFailure(lines, 'E492:', 8)
enddef
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker