mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 22:38:16 +00:00
refactor: pass window to was_set_insecurely
working on get_foldtext and wanted to get rid of the curwin backup/restore. Turns out it's not possible else f_foldtext is run on the same window. Kept the cleanup anyway.
This commit is contained in:
@@ -1178,8 +1178,7 @@ int eval_foldexpr(char_u *arg, int *cp)
|
||||
{
|
||||
typval_T tv;
|
||||
varnumber_T retval;
|
||||
int use_sandbox = was_set_insecurely((char_u *)"foldexpr",
|
||||
OPT_LOCAL);
|
||||
int use_sandbox = was_set_insecurely(curwin, (char_u *)"foldexpr", OPT_LOCAL);
|
||||
|
||||
++emsg_off;
|
||||
if (use_sandbox)
|
||||
|
Reference in New Issue
Block a user