comparison 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
comparison
equal deleted inserted replaced
22741:8c4ba2a7a44f 22742:f7f2d73ff85e
580 { 580 {
581 typval_T argvars[MAX_FUNC_ARGS]; 581 typval_T argvars[MAX_FUNC_ARGS];
582 funcexe_T funcexe; 582 funcexe_T funcexe;
583 int error; 583 int error;
584 int idx; 584 int idx;
585 int called_emsg_before = called_emsg; 585 int did_emsg_before = did_emsg;
586 586
587 if (ufunc->uf_def_status == UF_TO_BE_COMPILED 587 if (ufunc->uf_def_status == UF_TO_BE_COMPILED
588 && compile_def_function(ufunc, FALSE, NULL) == FAIL) 588 && compile_def_function(ufunc, FALSE, NULL) == FAIL)
589 return FAIL; 589 return FAIL;
590 if (ufunc->uf_def_status == UF_COMPILED) 590 if (ufunc->uf_def_status == UF_COMPILED)
618 if (error != FCERR_NONE) 618 if (error != FCERR_NONE)
619 { 619 {
620 user_func_error(error, ufunc->uf_name); 620 user_func_error(error, ufunc->uf_name);
621 return FAIL; 621 return FAIL;
622 } 622 }
623 if (called_emsg > called_emsg_before) 623 if (did_emsg > did_emsg_before)
624 // Error other than from calling the function itself. 624 // Error other than from calling the function itself.
625 return FAIL; 625 return FAIL;
626 return OK; 626 return OK;
627 } 627 }
628 628