# HG changeset patch # User Bram Moolenaar # Date 1640871903 -3600 # Node ID d9ced5bca6d653864e7ec41eae7d9a9d2520d7e3 # Parent 7b4e075fe5f1cc412076cb9bc7ad08203f3ccde9 patch 8.2.3946: when an internal error makes Vim exit the error is not seen Commit: https://github.com/vim/vim/commit/1c67f3a9779b99bed7aacb3108abbb649445d3ed Author: Bram Moolenaar Date: Thu Dec 30 13:32:09 2021 +0000 patch 8.2.3946: when an internal error makes Vim exit the error is not seen Problem: When an internal error makes Vim exit the error is not seen. Solution: Add the error to the test output. diff --git a/src/message.c b/src/message.c --- a/src/message.c +++ b/src/message.c @@ -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__ diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim --- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3946, +/**/ 3945, /**/ 3944,