aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-19 20:34:46 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-08-19 20:38:59 +0800
commitaa96a80d5df98d7fa888bd80eb7e4721e9e039f9 (patch)
tree5993800aeab6927390be0c1a0c451a33cbf0578e /src/nvim/message.c
parent2af9be3db59b2e26268dc62cb65e673e2f7d4783 (diff)
downloadrneovim-aa96a80d5df98d7fa888bd80eb7e4721e9e039f9.tar.gz
rneovim-aa96a80d5df98d7fa888bd80eb7e4721e9e039f9.tar.bz2
rneovim-aa96a80d5df98d7fa888bd80eb7e4721e9e039f9.zip
vim-patch:8.2.3946: when an internal error makes Vim exit the error is not seen
Problem: When an internal error makes Vim exit the error is not seen. Solution: Add the error to the test output. https://github.com/vim/vim/commit/1c67f3a9779b99bed7aacb3108abbb649445d3ed Add emsg_not_now() check to make code equivalent.
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 6cc68edb82..67b15e3e7d 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -830,8 +830,13 @@ static bool semsgv(const char *fmt, va_list ap)
/// detected when fuzzing vim.
void iemsg(const char *s)
{
+ if (emsg_not_now()) {
+ return;
+ }
+
emsg(s);
#ifdef ABORT_ON_INTERNAL_ERROR
+ set_vim_var_string(VV_ERRMSG, s, -1);
abort();
#endif
}