summaryrefslogtreecommitdiff
path: root/src/userfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-13 19:14:52 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-13 19:14:52 +0000
commit80d60910ff493f7b8ea52156e4c7df7e70a348c6 (patch)
treed2ba3f135760a64aa892b0f4bae7a7f597488a0f /src/userfunc.c
parent3b309f11db7904efcae0177c2825597042c07427 (diff)
downloadvim-git-8.2.3799.tar.gz
patch 8.2.3799: edit test hangs or failsv8.2.3799
Problem: Edit test hangs or fails. Solution: Do not rethrow an exception when inside try/catch.
Diffstat (limited to 'src/userfunc.c')
-rw-r--r--src/userfunc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/userfunc.c b/src/userfunc.c
index cc921f5a1..42fa492d7 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -3176,7 +3176,7 @@ call_callback(
// When a :def function was called that uses :try an error would be turned
// into an exception. Need to give the error here.
- if (need_rethrow && current_exception != NULL)
+ if (need_rethrow && current_exception != NULL && trylevel == 0)
{
need_rethrow = FALSE;
handle_did_throw();