summaryrefslogtreecommitdiffstats
path: root/src/drawscreen.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/drawscreen.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/drawscreen.c')
-rw-r--r--src/drawscreen.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 5a23d54fd6..361f98b24f 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -573,7 +573,6 @@ win_redr_status(win_T *wp, int ignore_pum UNUSED)
redraw_custom_statusline(win_T *wp)
{
static int entered = FALSE;
- int saved_did_emsg = did_emsg;
// When called recursively return. This can happen when the statusline
// contains an expression that triggers a redraw.
@@ -581,18 +580,7 @@ redraw_custom_statusline(win_T *wp)
return;
entered = TRUE;
- did_emsg = FALSE;
win_redr_custom(wp, FALSE);
- if (did_emsg)
- {
- // When there is an error disable the statusline, otherwise the
- // display is messed up with errors and a redraw triggers the problem
- // again and again.
- set_string_option_direct((char_u *)"statusline", -1,
- (char_u *)"", OPT_FREE | (*wp->w_p_stl != NUL
- ? OPT_LOCAL : OPT_GLOBAL), SID_ERROR);
- }
- did_emsg |= saved_did_emsg;
entered = FALSE;
}
#endif
@@ -673,12 +661,7 @@ win_redr_ruler(win_T *wp, int always, int ignore_pum)
#ifdef FEAT_STL_OPT
if (*p_ruf)
{
- int called_emsg_before = called_emsg;
-
win_redr_custom(wp, TRUE);
- if (called_emsg > called_emsg_before)
- set_string_option_direct((char_u *)"rulerformat", -1,
- (char_u *)"", OPT_FREE, SID_ERROR);
return;
}
#endif