Mercurial > vim
diff src/ex_eval.c @ 30598:37aa9fd2ed72 v9.0.0634
patch 9.0.0634: evaluating "expr" options has more overhead than needed
Commit: https://github.com/vim/vim/commit/a4e0b9785e409e9e660171cea76dfcc5fdafad9b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 1 19:43:52 2022 +0100
patch 9.0.0634: evaluating "expr" options has more overhead than needed
Problem: Evaluating "expr" options has more overhead than needed.
Solution: Use call_simple_func() for 'foldtext', 'includeexpr', 'printexpr',
"expr" of 'spellsuggest', 'diffexpr', 'patchexpr', 'balloonexpr',
'formatexpr', 'indentexpr' and 'charconvert'.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 01 Oct 2022 20:45:04 +0200 |
parents | 4bbc920bdef7 |
children | 39698292a849 |
line wrap: on
line diff
--- a/src/ex_eval.c +++ b/src/ex_eval.c @@ -1047,7 +1047,7 @@ ex_if(exarg_T *eap) skip = did_emsg || got_int || did_throw || (cstack->cs_idx > 0 && !(cstack->cs_flags[cstack->cs_idx - 1] & CSF_ACTIVE)); - result = eval_to_bool(eap->arg, &error, eap, skip); + result = eval_to_bool(eap->arg, &error, eap, skip, FALSE); if (!skip && !error) { @@ -1176,7 +1176,7 @@ ex_else(exarg_T *eap) if (skip && ends_excmd(*eap->arg)) semsg(_(e_invalid_expression_str), eap->arg); else - result = eval_to_bool(eap->arg, &error, eap, skip); + result = eval_to_bool(eap->arg, &error, eap, skip, FALSE); // When throwing error exceptions, we want to throw always the first // of several errors in a row. This is what actually happens when @@ -1283,7 +1283,7 @@ ex_while(exarg_T *eap) /* * ":while bool-expr" */ - result = eval_to_bool(eap->arg, &error, eap, skip); + result = eval_to_bool(eap->arg, &error, eap, skip, FALSE); } else {