]> granicus.if.org Git - vim/commitdiff
patch 8.2.3799: edit test hangs or fails v8.2.3799
authorBram Moolenaar <Bram@vim.org>
Mon, 13 Dec 2021 19:14:52 +0000 (19:14 +0000)
committerBram Moolenaar <Bram@vim.org>
Mon, 13 Dec 2021 19:14:52 +0000 (19:14 +0000)
Problem:    Edit test hangs or fails.
Solution:   Do not rethrow an exception when inside try/catch.

src/userfunc.c
src/version.c

index cc921f5a1dd04f3254ff8a3e37ed0c7ed318c365..42fa492d79856582e9a5c3a4912e68141d91728e 100644 (file)
@@ -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();
index edb1fbe4e1b1e441b7f536375a81d97f0e02701c..56d302e23c7949ede5dbcccef9abcd757c76377e 100644 (file)
@@ -749,6 +749,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3799,
 /**/
     3798,
 /**/