1
0
forked from aniani/vim

patch 9.0.0227: cannot read error message when abort() is called

Problem:    Cannot read error message when abort() is called.
Solution:   Output a newline before calling abort().
This commit is contained in:
Bram Moolenaar 2022-08-19 13:17:21 +01:00
parent 9e043181ad
commit 213e70e284
2 changed files with 8 additions and 2 deletions

View File

@ -831,6 +831,8 @@ iemsg(char *s)
emsg_core((char_u *)s); emsg_core((char_u *)s);
#if defined(ABORT_ON_INTERNAL_ERROR) && defined(FEAT_EVAL) #if defined(ABORT_ON_INTERNAL_ERROR) && defined(FEAT_EVAL)
set_vim_var_string(VV_ERRMSG, (char_u *)s, -1); set_vim_var_string(VV_ERRMSG, (char_u *)s, -1);
msg_putchar('\n'); // avoid overwriting the error message
out_flush();
abort(); abort();
#endif #endif
} }
@ -863,10 +865,12 @@ siemsg(const char *s, ...)
va_end(ap); va_end(ap);
emsg_core(IObuff); emsg_core(IObuff);
} }
}
# ifdef ABORT_ON_INTERNAL_ERROR # ifdef ABORT_ON_INTERNAL_ERROR
abort(); msg_putchar('\n'); // avoid overwriting the error message
out_flush();
abort();
# endif # endif
}
} }
#endif #endif

View File

@ -731,6 +731,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
227,
/**/ /**/
226, 226,
/**/ /**/