summaryrefslogtreecommitdiffstats
path: root/src/time.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-08-14 14:01:05 +0200
committerBram Moolenaar <Bram@vim.org>2021-08-14 14:01:05 +0200
commit88c89c77229e725ab2613b022249e2f506d82b82 (patch)
tree13d6d797ce01be15745d0b61b46ad8bdb23c4a5f /src/time.c
parent78a9c2e670d29349404b346e0aa90264cab19e9b (diff)
patch 8.2.3341: Vim9: function call aborted despite try/catchv8.2.3341
Problem: Vim9: function call aborted despite try/catch. (Naohiro Ono) Solution: Ignore error caught by try/catch. (closes #8755)
Diffstat (limited to 'src/time.c')
-rw-r--r--src/time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/time.c b/src/time.c
index ecd884f0f6..ab12691980 100644
--- a/src/time.c
+++ b/src/time.c
@@ -520,6 +520,7 @@ check_due_timer(void)
int save_timer_busy = timer_busy;
int save_vgetc_busy = vgetc_busy;
int save_did_emsg = did_emsg;
+ int prev_uncaught_emsg = uncaught_emsg;
int save_called_emsg = called_emsg;
int save_must_redraw = must_redraw;
int save_trylevel = trylevel;
@@ -536,7 +537,6 @@ check_due_timer(void)
vgetc_busy = 0;
called_emsg = 0;
did_emsg = FALSE;
- did_uncaught_emsg = FALSE;
must_redraw = 0;
trylevel = 0;
did_throw = FALSE;
@@ -555,7 +555,7 @@ check_due_timer(void)
did_one = TRUE;
timer_busy = save_timer_busy;
vgetc_busy = save_vgetc_busy;
- if (did_uncaught_emsg)
+ if (uncaught_emsg > prev_uncaught_emsg)
++timer->tr_emsg_count;
did_emsg = save_did_emsg;
called_emsg = save_called_emsg;