Mercurial > vim
diff src/vim9execute.c @ 22758:48feb3dd0d25 v8.2.1927
patch 8.2.1927: Vim9: get unknown error with an error in a timer function
Commit: https://github.com/vim/vim/commit/d66960bf578410e83ef96ad2f4206b26a139d817
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Oct 30 20:46:26 2020 +0100
patch 8.2.1927: Vim9: get unknown error with an error in a timer function
Problem: Vim9: get unknown error with an error in a timer function.
Solution: Use did_emsg instead of called_emsg. (closes https://github.com/vim/vim/issues/7231)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 30 Oct 2020 21:00:04 +0100 |
parents | 84fca115b1bb |
children | d235c5fa0bbe |
line wrap: on
line diff
--- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -828,7 +828,7 @@ call_def_function( int defcount = ufunc->uf_args.ga_len - argc; sctx_T save_current_sctx = current_sctx; int breakcheck_count = 0; - int called_emsg_before = called_emsg; + int did_emsg_before = did_emsg; int save_suppress_errthrow = suppress_errthrow; msglist_T **saved_msg_list = NULL; msglist_T *private_msg_list = NULL; @@ -853,7 +853,7 @@ call_def_function( || (ufunc->uf_def_status == UF_TO_BE_COMPILED && compile_def_function(ufunc, FALSE, NULL) == FAIL)) { - if (called_emsg == called_emsg_before) + if (did_emsg == did_emsg_before) semsg(_(e_function_is_not_compiled_str), printable_func_name(ufunc)); return FAIL; @@ -2924,7 +2924,7 @@ failed_early: // Not sure if this is necessary. suppress_errthrow = save_suppress_errthrow; - if (ret != OK && called_emsg == called_emsg_before) + if (ret != OK && did_emsg == did_emsg_before) semsg(_(e_unknown_error_while_executing_str), printable_func_name(ufunc)); return ret;