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/path.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nvim/path.c') diff --git a/src/nvim/path.c b/src/nvim/path.c index 793f917f06..f52fbbd5c8 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -1610,10 +1610,10 @@ void simplify_filename(char_u *filename) static char *eval_includeexpr(const char *const ptr, const size_t len) { - set_vim_var_string(VV_FNAME, ptr, (ptrdiff_t) len); - char *res = (char *) eval_to_string_safe( - curbuf->b_p_inex, NULL, was_set_insecurely((char_u *)"includeexpr", - OPT_LOCAL)); + set_vim_var_string(VV_FNAME, ptr, (ptrdiff_t)len); + char *res = (char *)eval_to_string_safe( + curbuf->b_p_inex, NULL, + was_set_insecurely(curwin, (char_u *)"includeexpr", OPT_LOCAL)); set_vim_var_string(VV_FNAME, NULL, 0); return res; } -- cgit