summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-15 15:23:44 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-15 15:23:44 +0000
commit069613c9e8645acea3a128c15ebdbf56e2219d44 (patch)
tree9d4e2e22abdcb03f59de0269353e23dcd3f2a335 /src/main.c
parentf60a63485ea26d9bda1618d1b72662eca65b5f1f (diff)
patch 8.2.4098: typing "interrupt" at debug prompt may keep exception aroundv8.2.4098
Problem: Typing "interrupt" at debug prompt may keep exception around, causing function calls to fail. Solution: Discard any exception at the toplevel. (closes #9532)
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 8f3856f7e2..72d0211432 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1246,6 +1246,13 @@ main_loop(
else
previous_got_int = FALSE;
+#ifdef FEAT_EVAL
+ // At the toplevel there is no exception handling. Discard any that
+ // may be hanging around (e.g. from "interrupt" at the debug prompt).
+ if (did_throw && !ex_normal_busy)
+ discard_current_exception();
+#endif
+
if (!exmode_active)
msg_scroll = FALSE;
quit_more = FALSE;