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:
@@ -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
|
||||
|
Reference in New Issue
Block a user