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:
@@ -747,6 +747,9 @@ do_cmdline(
|
||||
* cancel the whole command line, and any if/endif or loop.
|
||||
* If force_abort is set, we cancel everything.
|
||||
*/
|
||||
#ifdef FEAT_EVAL
|
||||
did_emsg_cumul += did_emsg;
|
||||
#endif
|
||||
did_emsg = FALSE;
|
||||
|
||||
/*
|
||||
@@ -778,7 +781,12 @@ do_cmdline(
|
||||
&& !(getline_is_func && func_has_abort(real_cookie))
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#ifdef FEAT_EVAL
|
||||
did_emsg_cumul += did_emsg;
|
||||
#endif
|
||||
did_emsg = FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* 1. If repeating a line in a loop, get a line from lines_ga.
|
||||
@@ -1026,7 +1034,10 @@ do_cmdline(
|
||||
if (did_emsg && !force_abort
|
||||
&& getline_equal(fgetline, cookie, get_func_line)
|
||||
&& !func_has_abort(real_cookie))
|
||||
{
|
||||
// did_emsg_cumul is not set here
|
||||
did_emsg = FALSE;
|
||||
}
|
||||
|
||||
if (cstack.cs_looplevel > 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user