src/nvim/screen.c
/*
 * Redraw the status line according to 'statusline' and take care of any
 * errors encountered.
 */
Redraw the status line according to 'statusline' and take care of any
errors encountered.
Redraw the status line according to ' statusline ' and take care of any errors encountered .
static void redraw_custom_statusline(win_T *wp)
{
  static int entered = false;
  int saved_did_emsg = did_emsg;
  if (entered)
    return;
  entered = TRUE;
  did_emsg = false;
  win_redr_custom(wp, false);
  if (did_emsg) {
    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;
}
static void redraw_custom_statusline ( win_T * wp ) { static int entered = false ; int saved_did_emsg = did_emsg ; if ( entered ) return ; entered = TRUE ; did_emsg = false ; win_redr_custom ( wp , false ) ; if ( did_emsg ) { set_string_option_direct ( ( char_u * ) " " , -1 , ( char_u * ) " " , OPT_FREE | ( * wp -> w_p_stl != NUL ? OPT_LOCAL : OPT_GLOBAL ) , SID_ERROR ) ; } did_emsg |= saved_did_emsg ; entered = false ; }
Redraw the status line according to 'statusline' and take care of any
 errors encountered.
Redraw the status line according to ' statusline ' and take care of any errors encountered .
/* When called recursively return.  This can happen when the statusline
   * contains an expression that triggers a redraw. */ // 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.