diff src/fold.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 89e1d67814a9
children f1d5ad2b978e
line wrap: on
line diff
--- a/src/fold.c
+++ b/src/fold.c
@@ -1960,7 +1960,8 @@ get_foldtext(
 
 	    ++emsg_off; // handle exceptions, but don't display errors
 	    text = eval_to_string_safe(wp->w_p_fdt,
-		    was_set_insecurely((char_u *)"foldtext", OPT_LOCAL), TRUE);
+			   was_set_insecurely((char_u *)"foldtext", OPT_LOCAL),
+			   TRUE, TRUE);
 	    --emsg_off;
 
 	    if (text == NULL || did_emsg)