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/hardcopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/hardcopy.c') diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c index 4a64cc31b1..2c954008b3 100644 --- a/src/nvim/hardcopy.c +++ b/src/nvim/hardcopy.c @@ -546,7 +546,7 @@ static void prt_header(prt_settings_T *const psettings, const int pagenum, curwin->w_botline = lnum + 63; printer_page_num = pagenum; - use_sandbox = was_set_insecurely((char_u *)"printheader", 0); + use_sandbox = was_set_insecurely(curwin, (char_u *)"printheader", 0); build_stl_str_hl(curwin, tbuf, (size_t)width + IOSIZE, p_header, use_sandbox, ' ', width, NULL, NULL); -- cgit