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/buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/buffer.c') diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 99cdde300d..ffa44c33cd 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -3198,7 +3198,7 @@ void maketitle(void) int use_sandbox = false; int save_called_emsg = called_emsg; - use_sandbox = was_set_insecurely((char_u *)"titlestring", 0); + use_sandbox = was_set_insecurely(curwin, (char_u *)"titlestring", 0); called_emsg = false; build_stl_str_hl(curwin, (char_u *)buf, sizeof(buf), p_titlestring, use_sandbox, @@ -3309,7 +3309,7 @@ void maketitle(void) int use_sandbox = false; int save_called_emsg = called_emsg; - use_sandbox = was_set_insecurely((char_u *)"iconstring", 0); + use_sandbox = was_set_insecurely(curwin, (char_u *)"iconstring", 0); called_emsg = false; build_stl_str_hl(curwin, icon_str, sizeof(buf), p_iconstring, use_sandbox, -- cgit