comparison src/findfile.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 58fb880f3607
children e5ee2ffd826a
comparison
equal deleted inserted replaced
30597:1e1b0454599d 30598:37aa9fd2ed72
2000 2000
2001 set_vim_var_string(VV_FNAME, ptr, len); 2001 set_vim_var_string(VV_FNAME, ptr, len);
2002 current_sctx = curbuf->b_p_script_ctx[BV_INEX]; 2002 current_sctx = curbuf->b_p_script_ctx[BV_INEX];
2003 2003
2004 res = eval_to_string_safe(curbuf->b_p_inex, 2004 res = eval_to_string_safe(curbuf->b_p_inex,
2005 was_set_insecurely((char_u *)"includeexpr", OPT_LOCAL), TRUE); 2005 was_set_insecurely((char_u *)"includeexpr", OPT_LOCAL),
2006 TRUE, TRUE);
2006 2007
2007 set_vim_var_string(VV_FNAME, NULL, 0); 2008 set_vim_var_string(VV_FNAME, NULL, 0);
2008 current_sctx = save_sctx; 2009 current_sctx = save_sctx;
2009 return res; 2010 return res;
2010 } 2011 }