Merge pull request #5665 from brcolow/vim-7.4.1711

vim-patch:7.4.1711
This commit is contained in:
James McCoy
2016-12-01 09:01:55 -05:00
4 changed files with 51 additions and 11 deletions

View File

@@ -4939,8 +4939,8 @@ void win_redr_status(win_T *wp)
*/
static void redraw_custom_statusline(win_T *wp)
{
static int entered = FALSE;
int save_called_emsg = called_emsg;
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. */
@@ -4948,18 +4948,18 @@ static void redraw_custom_statusline(win_T *wp)
return;
entered = TRUE;
called_emsg = FALSE;
win_redr_custom(wp, FALSE);
if (called_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. */
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);
}
called_emsg |= save_called_emsg;
entered = FALSE;
did_emsg |= saved_did_emsg;
entered = false;
}
/*