summaryrefslogtreecommitdiffstats
path: root/src/message.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-08-19 13:17:21 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-19 13:17:21 +0100
commit213e70e284b0975dd34525e94e59e26811097c72 (patch)
tree7a1549b72ef113af45f037b24db4e16cbbd4d43e /src/message.c
parent9e043181ad51536f23d069e719d6f6b96c4c0ec0 (diff)
patch 9.0.0227: cannot read error message when abort() is calledv9.0.0227
Problem: Cannot read error message when abort() is called. Solution: Output a newline before calling abort().
Diffstat (limited to 'src/message.c')
-rw-r--r--src/message.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/message.c b/src/message.c
index ec128bd425..11662ba6a5 100644
--- 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
- abort();
+ msg_putchar('\n'); // avoid overwriting the error message
+ out_flush();
+ abort();
# endif
+ }
}
#endif