Mercurial > vim
changeset 29775:455e7588b979 v9.0.0227
patch 9.0.0227: cannot read error message when abort() is called
Commit: https://github.com/vim/vim/commit/213e70e284b0975dd34525e94e59e26811097c72
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 19 13:17:21 2022 +0100
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().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 19 Aug 2022 14:30:03 +0200 |
parents | 7749e69fb61f |
children | b91c813678d1 |
files | src/message.c src/version.c |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/message.c +++ b/src/message.c @@ -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 + msg_putchar('\n'); // avoid overwriting the error message + out_flush(); + abort(); +# endif } -# ifdef ABORT_ON_INTERNAL_ERROR - abort(); -# endif } #endif