diff options
-rw-r--r-- | src/nvim/message.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c index 67b15e3e7d..684cf7207c 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -837,6 +837,8 @@ void iemsg(const char *s) emsg(s); #ifdef ABORT_ON_INTERNAL_ERROR set_vim_var_string(VV_ERRMSG, s, -1); + msg_putchar('\n'); // avoid overwriting the error message + ui_flush(); abort(); #endif } @@ -846,11 +848,17 @@ void iemsg(const char *s) /// detected when fuzzing vim. void siemsg(const char *s, ...) { + if (emsg_not_now()) { + return; + } + va_list ap; va_start(ap, s); (void)semsgv(s, ap); va_end(ap); #ifdef ABORT_ON_INTERNAL_ERROR + msg_putchar('\n'); // avoid overwriting the error message + ui_flush(); abort(); #endif } |