summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui.c b/src/gui.c
index 8fd3114743..7b59300586 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -3704,14 +3704,12 @@ get_tabline_label(
if (**opt != NUL)
{
int use_sandbox = FALSE;
- int save_called_emsg = called_emsg;
+ int called_emsg_before = called_emsg;
char_u res[MAXPATHL];
tabpage_T *save_curtab;
char_u *opt_name = (char_u *)(tooltip ? "guitabtooltip"
: "guitablabel");
- called_emsg = FALSE;
-
printer_page_num = tabpage_index(tp);
# ifdef FEAT_EVAL
set_vim_var_nr(VV_LNUM, printer_page_num);
@@ -3742,10 +3740,9 @@ get_tabline_label(
curwin = curtab->tp_curwin;
curbuf = curwin->w_buffer;
- if (called_emsg)
+ if (called_emsg > called_emsg_before)
set_string_option_direct(opt_name, -1,
(char_u *)"", OPT_FREE, SID_ERROR);
- called_emsg |= save_called_emsg;
}
// If 'guitablabel'/'guitabtooltip' is not set or the result is empty then