diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-08-01 10:41:08 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-08-02 11:56:51 +0800 |
commit | 582bf4f1e15988565da53a91395e2d0131628fbb (patch) | |
tree | 320f48a9beb4271a9ffd32eca0db526d3276de7c /src/nvim/path.c | |
parent | f7fde0173af95925e7324b7d3c09776173dab8a7 (diff) | |
download | rneovim-582bf4f1e15988565da53a91395e2d0131628fbb.tar.gz rneovim-582bf4f1e15988565da53a91395e2d0131628fbb.tar.bz2 rneovim-582bf4f1e15988565da53a91395e2d0131628fbb.zip |
vim-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'.
https://github.com/vim/vim/commit/a4e0b9785e409e9e660171cea76dfcc5fdafad9b
vim-patch:9.0.0635: build error and compiler warnings
Problem: Build error and compiler warnings.
Solution: Add missing change. Add type casts.
https://github.com/vim/vim/commit/3292a229402c9892f5ab90645fbfe2b1db342f5b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r-- | src/nvim/path.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c index adea7ff0f7..67acc6e51b 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -1398,7 +1398,7 @@ static int expand_backtick(garray_T *gap, char *pat, int flags) char *cmd = xmemdupz(pat + 1, strlen(pat) - 2); if (*cmd == '=') { // `={expr}`: Expand expression - buffer = eval_to_string(cmd + 1, true); + buffer = eval_to_string(cmd + 1, true, false); } else { buffer = get_cmd_output(cmd, NULL, (flags & EW_SILENT) ? kShellOptSilent : 0, NULL); } @@ -1694,7 +1694,8 @@ static char *eval_includeexpr(const char *const ptr, const size_t len) current_sctx = curbuf->b_p_script_ctx[BV_INEX].script_ctx; char *res = eval_to_string_safe(curbuf->b_p_inex, - was_set_insecurely(curwin, kOptIncludeexpr, OPT_LOCAL)); + was_set_insecurely(curwin, kOptIncludeexpr, OPT_LOCAL), + true); set_vim_var_string(VV_FNAME, NULL, 0); current_sctx = save_sctx; |