0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.1919: assert_fails() setting emsg_silent changes normal execution

Problem:    Assert_fails() setting emsg_silent changes normal execution.
Solution:   Use a separate flag in_assert_fails.
This commit is contained in:
Bram Moolenaar
2020-10-28 20:20:00 +01:00
parent 3e2534ed1a
commit 28ee892ac4
19 changed files with 44 additions and 36 deletions

View File

@@ -582,7 +582,7 @@ call_ufunc(ufunc_T *ufunc, int argcount, ectx_T *ectx, isn_T *iptr)
funcexe_T funcexe;
int error;
int idx;
int called_emsg_before = called_emsg;
int did_emsg_before = did_emsg;
if (ufunc->uf_def_status == UF_TO_BE_COMPILED
&& compile_def_function(ufunc, FALSE, NULL) == FAIL)
@@ -620,7 +620,7 @@ call_ufunc(ufunc_T *ufunc, int argcount, ectx_T *ectx, isn_T *iptr)
user_func_error(error, ufunc->uf_name);
return FAIL;
}
if (called_emsg > called_emsg_before)
if (did_emsg > did_emsg_before)
// Error other than from calling the function itself.
return FAIL;
return OK;