From 4f1fc0f6d514980700152b7c05e5c92ec379f0d7 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Wed, 18 Nov 2020 22:52:49 +0100 Subject: 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. --- src/nvim/eval.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nvim/eval.c') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 402211080b..054b788940 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -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) -- cgit