]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4098: typing "interrupt" at debug prompt may keep exception around v8.2.4098
authorBram Moolenaar <Bram@vim.org>
Sat, 15 Jan 2022 15:23:44 +0000 (15:23 +0000)
committerBram Moolenaar <Bram@vim.org>
Sat, 15 Jan 2022 15:23:44 +0000 (15:23 +0000)
Problem:    Typing "interrupt" at debug prompt may keep exception around,
            causing function calls to fail.
Solution:   Discard any exception at the toplevel. (closes #9532)

src/main.c
src/version.c

index 8f3856f7e2d09b901b4b150cb72f7085931db4b5..72d02114320624528895e94705d7e4169c523609 100644 (file)
@@ -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;
index 7a75be32aaefc18f45e3b4892b80977fc7f7466a..879a0e8b47fb02b5eadd259c97b3aadd5ea70f62 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4098,
 /**/
     4097,
 /**/