diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2022-11-07 12:16:51 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-07 12:16:51 +0000 |
commit | 7b224fdf4a29f115567d4fc8629c1cef92d8444a (patch) | |
tree | 5f610db7cd966ed44e3dd29dd41223f3d0176403 /src/gui.c | |
parent | 1756f4b21837e8596241ecd668f4abbbab4bc7e5 (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.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -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 |