forked from aniani/vim
patch 8.2.3833: error from term_start() not caught by try/catch
Problem: Error from term_start() not caught by try/catch. Solution: save and restore did_emsg when applying autocommands. (Ozaki Kiichi, closes #9361)
This commit is contained in:
@@ -1891,6 +1891,7 @@ apply_autocmds_group(
|
||||
int did_save_redobuff = FALSE;
|
||||
save_redo_T save_redo;
|
||||
int save_KeyTyped = KeyTyped;
|
||||
int save_did_emsg;
|
||||
ESTACK_CHECK_DECLARATION
|
||||
|
||||
/*
|
||||
@@ -2171,9 +2172,13 @@ apply_autocmds_group(
|
||||
// make sure cursor and topline are valid
|
||||
check_lnums(TRUE);
|
||||
|
||||
save_did_emsg = did_emsg;
|
||||
|
||||
do_cmdline(NULL, getnextac, (void *)&patcmd,
|
||||
DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT);
|
||||
|
||||
did_emsg += save_did_emsg;
|
||||
|
||||
if (nesting == 1)
|
||||
// restore cursor and topline, unless they were changed
|
||||
reset_lnums();
|
||||
|
Reference in New Issue
Block a user