0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.2097: Vim9: using :silent! when calling a function prevents abort

Problem:    Vim9: using :silent! when calling a function prevents abortng that
            function.
Solution:   Add emsg_silent_def and did_emsg_def.
This commit is contained in:
Bram Moolenaar
2020-12-05 21:22:08 +01:00
parent f665e97ffa
commit 56602ba153
5 changed files with 43 additions and 2 deletions

View File

@@ -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