summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2022-11-07 12:16:51 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-07 12:16:51 +0000
commit7b224fdf4a29f115567d4fc8629c1cef92d8444a (patch)
tree5f610db7cd966ed44e3dd29dd41223f3d0176403 /src/gui.c
parent1756f4b21837e8596241ecd668f4abbbab4bc7e5 (diff)
patch 9.0.0844: handling 'statusline' errors is spread outv9.0.0844
Problem: Handling 'statusline' errors is spread out. Solution: Pass the option name to the lower levels so the option can be reset there when an error is encountered. (Luuk van Baal, closes #11467)
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/gui.c b/src/gui.c
index 67b4d3e12a..dbd8d3fcc1 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -3763,8 +3763,6 @@ get_tabline_label(
opt = (tooltip ? &p_gtt : &p_gtl);
if (**opt != NUL)
{
- int use_sandbox = FALSE;
- int called_emsg_before = called_emsg;
char_u res[MAXPATHL];
tabpage_T *save_curtab;
char_u *opt_name = (char_u *)(tooltip ? "guitabtooltip"
@@ -3773,7 +3771,6 @@ get_tabline_label(
printer_page_num = tabpage_index(tp);
# ifdef FEAT_EVAL
set_vim_var_nr(VV_LNUM, printer_page_num);
- use_sandbox = was_set_insecurely(opt_name, 0);
# endif
// It's almost as going to the tabpage, but without autocommands.
curtab->tp_firstwin = firstwin;
@@ -3788,7 +3785,7 @@ get_tabline_label(
curbuf = curwin->w_buffer;
// Can't use NameBuff directly, build_stl_str_hl() uses it.
- build_stl_str_hl(curwin, res, MAXPATHL, *opt, use_sandbox,
+ build_stl_str_hl(curwin, res, MAXPATHL, *opt, opt_name, 0,
0, (int)Columns, NULL, NULL);
STRCPY(NameBuff, res);
@@ -3799,10 +3796,6 @@ get_tabline_label(
lastwin = curtab->tp_lastwin;
curwin = curtab->tp_curwin;
curbuf = curwin->w_buffer;
-
- if (called_emsg > called_emsg_before)
- set_string_option_direct(opt_name, -1,
- (char_u *)"", OPT_FREE, SID_ERROR);
}
// If 'guitablabel'/'guitabtooltip' is not set or the result is empty then