aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fold.c
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2020-11-24 07:10:55 +0100
committerGitHub <noreply@github.com>2020-11-24 07:10:55 +0100
commitdd876a15489beea14cd35417ca5147cb5316e9ce (patch)
tree091e9b1ddf9451609e513c7bdc2d20865a1e9086 /src/nvim/fold.c
parent2d36b62eda16ae1cf370f4107530fa65d2b1bce4 (diff)
parent7eb0c16dc8433e27ce0c8573a80284ec044d5ef4 (diff)
downloadrneovim-dd876a15489beea14cd35417ca5147cb5316e9ce.tar.gz
rneovim-dd876a15489beea14cd35417ca5147cb5316e9ce.tar.bz2
rneovim-dd876a15489beea14cd35417ca5147cb5316e9ce.zip
Merge pull request #13322 from teto/remove_curwin
refactor: pass window to was_set_insecurely
Diffstat (limited to 'src/nvim/fold.c')
-rw-r--r--src/nvim/fold.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c
index 5e28ca6538..654aa6d5ba 100644
--- a/src/nvim/fold.c
+++ b/src/nvim/fold.c
@@ -1835,10 +1835,11 @@ char_u *get_foldtext(win_T *wp, linenr_T lnum, linenr_T lnume,
curwin = wp;
curbuf = wp->w_buffer;
- ++emsg_silent; /* handle exceptions, but don't display errors */
- text = eval_to_string_safe(wp->w_p_fdt, NULL,
- was_set_insecurely((char_u *)"foldtext", OPT_LOCAL));
- --emsg_silent;
+ emsg_silent++; // handle exceptions, but don't display errors
+ text = eval_to_string_safe(
+ wp->w_p_fdt, NULL,
+ was_set_insecurely(wp, (char_u *)"foldtext", OPT_LOCAL));
+ emsg_silent--;
if (text == NULL || did_emsg)
got_fdt_error = TRUE;