From a4e0b9785e409e9e660171cea76dfcc5fdafad9b Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 1 Oct 2022 19:43:52 +0100 Subject: 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'. --- src/findfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/findfile.c') diff --git a/src/findfile.c b/src/findfile.c index 5751a07270..9ce733cfd6 100644 --- a/src/findfile.c +++ b/src/findfile.c @@ -2002,7 +2002,8 @@ eval_includeexpr(char_u *ptr, int len) current_sctx = curbuf->b_p_script_ctx[BV_INEX]; res = eval_to_string_safe(curbuf->b_p_inex, - was_set_insecurely((char_u *)"includeexpr", OPT_LOCAL), TRUE); + was_set_insecurely((char_u *)"includeexpr", OPT_LOCAL), + TRUE, TRUE); set_vim_var_string(VV_FNAME, NULL, 0); current_sctx = save_sctx; -- cgit v1.2.3