Merge pull request #24154 from zeertzjq/vim-9.0.1665

vim-patch:8.2.3833,9.0.1665
This commit is contained in:
zeertzjq
2023-06-26 07:55:49 +08:00
committed by GitHub
2 changed files with 13 additions and 1 deletions

View File

@@ -1783,8 +1783,14 @@ bool apply_autocmds_group(event_T event, char *fname, char *fname_io, bool force
check_lnums_nested(true);
}
const int save_did_emsg = did_emsg;
const bool save_ex_pressedreturn = get_pressedreturn();
// Execute the autocmd. The `getnextac` callback handles iteration.
do_cmdline(NULL, getnextac, (void *)&patcmd, DOCMD_NOWAIT | DOCMD_VERBOSE | DOCMD_REPEAT);
do_cmdline(NULL, getnextac, &patcmd, DOCMD_NOWAIT | DOCMD_VERBOSE | DOCMD_REPEAT);
did_emsg += save_did_emsg;
set_pressedreturn(save_ex_pressedreturn);
if (nesting == 1) {
// restore cursor and topline, unless they were changed

View File

@@ -244,6 +244,12 @@ func Test_ex_mode_errors()
au! CmdLineEnter
delfunc ExEnterFunc
au CmdlineEnter * :
call feedkeys("gQecho 1\r", 'xt')
au! CmdlineEnter
quit
endfunc