vim-patch:9.0.0844: handling 'statusline' errors is spread out (#20992)

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 vim/vim#11467)

7b224fdf4a
This commit is contained in:
luukvbaal
2022-11-08 00:21:22 +01:00
committed by GitHub
parent 050b0e30b9
commit 8147d3df28
7 changed files with 51 additions and 72 deletions

View File

@@ -999,16 +999,7 @@ void draw_tabline(void)
// Use the 'tabline' option if it's set.
if (*p_tal != NUL) {
int saved_did_emsg = did_emsg;
// Check for an error. If there is one we would loop in redrawing the
// screen. Avoid that by making 'tabline' empty.
did_emsg = false;
win_redr_custom(NULL, false, false);
if (did_emsg) {
set_string_option_direct("tabline", -1, "", OPT_FREE, SID_ERROR);
}
did_emsg |= saved_did_emsg;
} else {
FOR_ALL_TABS(tp) {
tabcount++;