]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.3946: when an internal error makes Vim exit the error is not seen v8.2.3946
authorBram Moolenaar <Bram@vim.org>
Thu, 30 Dec 2021 13:32:09 +0000 (13:32 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 30 Dec 2021 13:32:09 +0000 (13:32 +0000)
Problem:    When an internal error makes Vim exit the error is not seen.
Solution:   Add the error to the test output.

src/message.c
src/testdir/runtest.vim
src/version.c

index 7e98d0b9940120edc44fea6e850ef35253da33de..8768065bb66893c15d0ba6c70d4363742c31c72e 100644 (file)
@@ -824,10 +824,13 @@ semsg(const char *s, ...)
 iemsg(char *s)
 {
     if (!emsg_not_now())
+    {
        emsg_core((char_u *)s);
 #ifdef ABORT_ON_INTERNAL_ERROR
-    abort();
+       set_vim_var_string(VV_ERRMSG, (char_u *)s, -1);
+       abort();
 #endif
+    }
 }
 
 #ifndef PROTO  // manual proto with __attribute__
index 912bc203457af1e2ef88bf38961ab2352617f2bc..d4c42f332eb7e46fb006c3a2cc0149bcdc4baf86 100644 (file)
@@ -304,6 +304,7 @@ endfunc
 func EarlyExit(test)
   " It's OK for the test we use to test the quit detection.
   if a:test != 'Test_zz_quit_detected()'
+    call add(v:errors, v:errmsg)
     call add(v:errors, 'Test caused Vim to exit: ' . a:test)
   endif
 
index a04c91cbd4fa8fd0bbbe0fb832c5e1acbb9ef3ce..25e40bf4c70a7ffd4fd260ce7c3333c06cdc77ce 100644 (file)
@@ -749,6 +749,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3946,
 /**/
     3945,
 /**/