if (did_emsg > did_emsg_before)
{
usefmt = NULL;
- set_string_option_direct((char_u *)"tabpanel", -1, (char_u *)"",
- OPT_FREE | OPT_GLOBAL, SID_ERROR);
+ set_string_option_direct(opt_name, -1, (char_u *)"",
+ OPT_FREE | opt_scope, SID_ERROR);
}
}
#endif
args.prow = &row;
args.pcol = &col;
draw_tabpanel_userdefined(tplmode, &args);
+ // p_tpl could have been freed in build_stl_str_hl()
+ if (p_tpl == NULL || *p_tpl == NUL)
+ {
+ usefmt = NULL;
+ break;
+ }
p += i;
i = 0;
catch /^Vim\%((\a\+)\)\=:E117:/
endtry
call assert_true(empty(&tabpanel))
+
+ try
+ set tabpanel=%{my#util#TabPanelHighlight}%t
+ redraw!
+ catch /^Vim\%((\a\+)\)\=:E121:/
+ endtry
+ call assert_true(empty(&tabpanel))
+
set tabpanel&vim
set showtabpanel&vim
endfunc