Mercurial > vim
diff src/vim9execute.c @ 22742:f7f2d73ff85e v8.2.1919
patch 8.2.1919: assert_fails() setting emsg_silent changes normal execution
Commit: https://github.com/vim/vim/commit/28ee892ac4197421b3317f195512ca64cc56a5b4
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Oct 28 20:20:00 2020 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 28 Oct 2020 20:30:04 +0100 |
parents | 56907027dba7 |
children | 84fca115b1bb |
line wrap: on
line diff
--- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -582,7 +582,7 @@ call_ufunc(ufunc_T *ufunc, int argcount, 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, 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;