diff src/screen.c @ 8847:470ea7526cc6 v7.4.1711

commit https://github.com/vim/vim/commit/a742e084b677f76c67e9e52c4f9fb9ab24002e20 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 5 21:10:38 2016 +0200 patch 7.4.1711 Problem: When using try/catch in 'statusline' it is still considered an error and the status line will be disabled. Solution: Check did_emsg instead of called_emsg. (haya14busa, closes https://github.com/vim/vim/issues/729)
author Christian Brabandt <cb@256bit.org>
date Tue, 05 Apr 2016 21:15:05 +0200
parents a1132255e3e1
children 4d4de770f970
line wrap: on
line diff
--- a/src/screen.c
+++ b/src/screen.c
@@ -6779,7 +6779,7 @@ win_redr_status(win_T *wp)
 redraw_custom_statusline(win_T *wp)
 {
     static int	    entered = FALSE;
-    int		    save_called_emsg = called_emsg;
+    int		    saved_did_emsg = did_emsg;
 
     /* When called recursively return.  This can happen when the statusline
      * contains an expression that triggers a redraw. */
@@ -6787,9 +6787,9 @@ redraw_custom_statusline(win_T *wp)
 	return;
     entered = TRUE;
 
-    called_emsg = FALSE;
+    did_emsg = FALSE;
     win_redr_custom(wp, FALSE);
-    if (called_emsg)
+    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
@@ -6798,7 +6798,7 @@ redraw_custom_statusline(win_T *wp)
 		(char_u *)"", OPT_FREE | (*wp->w_p_stl != NUL
 					? OPT_LOCAL : OPT_GLOBAL), SID_ERROR);
     }
-    called_emsg |= save_called_emsg;
+    did_emsg |= saved_did_emsg;
     entered = FALSE;
 }
 #endif