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:
Matthieu Coudron
2020-11-18 22:52:49 +01:00
parent 7dfeadb0fc
commit 4f1fc0f6d5
9 changed files with 33 additions and 32 deletions

View File

@@ -4117,8 +4117,8 @@ fex_format(
int c /* character to be inserted */
)
{
int use_sandbox = was_set_insecurely((char_u *)"formatexpr",
OPT_LOCAL);
int use_sandbox = was_set_insecurely(
curwin, (char_u *)"formatexpr", OPT_LOCAL);
int r;
char_u *fex;