diff src/userfunc.c @ 26540:682ff45f289f v8.2.3799

patch 8.2.3799: edit test hangs or fails Commit: https://github.com/vim/vim/commit/80d60910ff493f7b8ea52156e4c7df7e70a348c6 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Dec 13 19:14:52 2021 +0000 patch 8.2.3799: edit test hangs or fails Problem: Edit test hangs or fails. Solution: Do not rethrow an exception when inside try/catch.
author Bram Moolenaar <Bram@vim.org>
date Mon, 13 Dec 2021 20:15:03 +0100
parents dfa658800f21
children dff04b7fa6b2
line wrap: on
line diff
--- 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();