]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.0227: cannot read error message when abort() is called v9.0.0227
authorBram Moolenaar <Bram@vim.org>
Fri, 19 Aug 2022 12:17:21 +0000 (13:17 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 19 Aug 2022 12:17:21 +0000 (13:17 +0100)
Problem:    Cannot read error message when abort() is called.
Solution:   Output a newline before calling abort().

src/message.c
src/version.c

index ec128bd42518dbc3a1e66cec65d05ffff44bbd03..11662ba6a59d398376e3c7f86160b069fa4174a2 100644 (file)
@@ -831,6 +831,8 @@ iemsg(char *s)
        emsg_core((char_u *)s);
 #if defined(ABORT_ON_INTERNAL_ERROR) && defined(FEAT_EVAL)
        set_vim_var_string(VV_ERRMSG, (char_u *)s, -1);
+       msg_putchar('\n');  // avoid overwriting the error message
+       out_flush();
        abort();
 #endif
     }
@@ -863,10 +865,12 @@ siemsg(const char *s, ...)
            va_end(ap);
            emsg_core(IObuff);
        }
-    }
 # ifdef ABORT_ON_INTERNAL_ERROR
-    abort();
+       msg_putchar('\n');  // avoid overwriting the error message
+       out_flush();
+       abort();
 # endif
+    }
 }
 #endif
 
index bbe7a2e8c5498140b162a98c2677e4d23709bada..5d69c638dcb6c66ebfb5a6474a6aa928981f02d7 100644 (file)
@@ -731,6 +731,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    227,
 /**/
     226,
 /**/