diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-04-03 10:43:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-03 10:43:03 +0800 |
commit | 99b3a068de1032975c4ab1486c0594a37aeabde8 (patch) | |
tree | 2a0a1a110896b9ae7401d61d1f9b0c2fc713a3f6 /src | |
parent | 30b94ae4942b4e82030bc079368dd7fcb5481456 (diff) | |
download | rneovim-99b3a068de1032975c4ab1486c0594a37aeabde8.tar.gz rneovim-99b3a068de1032975c4ab1486c0594a37aeabde8.tar.bz2 rneovim-99b3a068de1032975c4ab1486c0594a37aeabde8.zip |
vim-patch:8.2.4098: typing "interrupt" at debug prompt may keep exception around (#28161)
Problem: Typing "interrupt" at debug prompt may keep exception around,
causing function calls to fail.
Solution: Discard any exception at the toplevel. (closes vim/vim#9532)
https://github.com/vim/vim/commit/069613c9e8645acea3a128c15ebdbf56e2219d44
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/normal.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index c7eb5c5793..2eb247a47e 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -32,6 +32,7 @@ #include "nvim/ex_cmds.h" #include "nvim/ex_cmds2.h" #include "nvim/ex_docmd.h" +#include "nvim/ex_eval.h" #include "nvim/ex_getln.h" #include "nvim/fileio.h" #include "nvim/fold.h" @@ -1403,6 +1404,12 @@ static int normal_check(VimState *state) normal_check_stuff_buffer(s); normal_check_interrupt(s); + // 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(); + } + if (!exmode_active) { msg_scroll = false; } |