0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.0.1067: try/catch in timer does not prevent it from being stopped

Problem:    Using try/catch in timer does not prevent it from being stopped.
Solution:   Reset the exception context and use did_emsg instead of
            called_emsg.
This commit is contained in:
Bram Moolenaar
2017-09-06 23:40:10 +02:00
parent 2e49b6b20c
commit e723c42836
5 changed files with 49 additions and 14 deletions

View File

@@ -609,11 +609,9 @@ emsg(char_u *s)
called_emsg = TRUE;
/*
* If "emsg_severe" is TRUE: When an error exception is to be thrown,
* prefer this message over previous messages for the same command.
*/
#ifdef FEAT_EVAL
/* If "emsg_severe" is TRUE: When an error exception is to be thrown,
* prefer this message over previous messages for the same command. */
severe = emsg_severe;
emsg_severe = FALSE;
#endif
@@ -684,6 +682,9 @@ emsg(char_u *s)
else
flush_buffers(FALSE); /* flush internal buffers */
did_emsg = TRUE; /* flag for DoOneCmd() */
#ifdef FEAT_EVAL
did_uncaught_emsg = TRUE;
#endif
}
emsg_on_display = TRUE; /* remember there is an error message */