aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/indent.c
diff options
context:
space:
mode:
authorMatthieu Coudron <mcoudron@hotmail.com>2020-11-18 22:52:49 +0100
committerMatthieu Coudron <mcoudron@hotmail.com>2020-11-23 21:06:56 +0100
commit4f1fc0f6d514980700152b7c05e5c92ec379f0d7 (patch)
tree56488620cbef1d2d13e7c9866364ea1d7292da17 /src/nvim/indent.c
parent7dfeadb0fcbcedeafc357e60f0b7b2b8916afeaf (diff)
downloadrneovim-4f1fc0f6d514980700152b7c05e5c92ec379f0d7.tar.gz
rneovim-4f1fc0f6d514980700152b7c05e5c92ec379f0d7.tar.bz2
rneovim-4f1fc0f6d514980700152b7c05e5c92ec379f0d7.zip
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.
Diffstat (limited to 'src/nvim/indent.c')
-rw-r--r--src/nvim/indent.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c
index 9e6693afdf..fae971b3b3 100644
--- a/src/nvim/indent.c
+++ b/src/nvim/indent.c
@@ -453,7 +453,8 @@ int get_expr_indent(void)
colnr_T save_curswant;
int save_set_curswant;
int save_State;
- int use_sandbox = was_set_insecurely((char_u *)"indentexpr", OPT_LOCAL);
+ int use_sandbox = was_set_insecurely(
+ curwin, (char_u *)"indentexpr", OPT_LOCAL);
// Save and restore cursor position and curswant, in case it was changed
// * via :normal commands.