diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-12-05 21:22:08 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-12-05 21:22:08 +0100 |
commit | 56602ba153af7130b76daf83933922aaea3e2646 (patch) | |
tree | 13cf686a65d3673353517f66f2d9ad88f336cb8b /src/message.c | |
parent | f665e97ffa06817975810cb511b13dbaa83ec630 (diff) | |
download | vim-git-56602ba153af7130b76daf83933922aaea3e2646.tar.gz |
patch 8.2.2097: Vim9: using :silent! when calling a function prevents abortv8.2.2097
Problem: Vim9: using :silent! when calling a function prevents abortng that
function.
Solution: Add emsg_silent_def and did_emsg_def.
Diffstat (limited to 'src/message.c')
-rw-r--r-- | src/message.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/message.c b/src/message.c index 43e7e5e52..e4f96d0de 100644 --- a/src/message.c +++ b/src/message.c @@ -697,6 +697,12 @@ emsg_core(char_u *s) } redir_write(s, -1); } +#ifdef FEAT_EVAL + // Only increment did_emsg_def when :silent! wasn't used inside the + // :def function. + if (emsg_silent == emsg_silent_def) + ++did_emsg_def; +#endif #ifdef FEAT_JOB_CHANNEL ch_log(NULL, "ERROR silent: %s", (char *)s); #endif |