Mercurial > vim
diff src/buffer.c @ 27301:ebe56a24acb6 v8.2.4179
patch 8.2.4179: 'foldtext' is evaluated in the current script context
Commit: https://github.com/vim/vim/commit/9530b580a7b71960dbbdb2b12a3aafeb540bd135
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 22 13:39:08 2022 +0000
patch 8.2.4179: 'foldtext' is evaluated in the current script context
Problem: 'foldtext' is evaluated in the current script context.
Solution: Use the script context where the option was set.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 22 Jan 2022 14:45:02 +0100 |
parents | 841145bb9885 |
children | 41e0dcf38521 |
line wrap: on
line diff
--- a/src/buffer.c +++ b/src/buffer.c @@ -4162,7 +4162,7 @@ build_stl_str_hl( tv.vval.v_number = wp->w_id; set_var((char_u *)"g:statusline_winid", &tv, FALSE); - usefmt = eval_to_string_safe(fmt + 2, use_sandbox); + usefmt = eval_to_string_safe(fmt + 2, use_sandbox, FALSE); if (usefmt == NULL) usefmt = fmt; @@ -4546,7 +4546,7 @@ build_stl_str_hl( if (curwin != save_curwin) VIsual_active = FALSE; - str = eval_to_string_safe(p, use_sandbox); + str = eval_to_string_safe(p, use_sandbox, FALSE); curwin = save_curwin; curbuf = save_curbuf;