3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.118
3ef2ca
Fcc: outbox
3ef2ca
From: Bram Moolenaar <Bram@moolenaar.net>
3ef2ca
Mime-Version: 1.0
3ef2ca
Content-Type: text/plain; charset=UTF-8
3ef2ca
Content-Transfer-Encoding: 8bit
3ef2ca
------------
3ef2ca
3ef2ca
Patch 7.4.118
3ef2ca
Problem:    It's possible that redrawing the status lines causes
3ef2ca
	    win_redr_custom() to be called recursively.
3ef2ca
Solution:   Protect against recursiveness. (Yasuhiro Matsumoto)
3ef2ca
Files:	    src/screen.c
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.117/src/screen.c	2013-11-08 04:30:06.000000000 +0100
3ef2ca
--- src/screen.c	2013-12-11 15:32:21.000000000 +0100
3ef2ca
***************
3ef2ca
*** 6653,6658 ****
3ef2ca
--- 6653,6659 ----
3ef2ca
      win_T	*wp;
3ef2ca
      int		draw_ruler;	/* TRUE or FALSE */
3ef2ca
  {
3ef2ca
+     static int	entered = FALSE;
3ef2ca
      int		attr;
3ef2ca
      int		curattr;
3ef2ca
      int		row;
3ef2ca
***************
3ef2ca
*** 6671,6676 ****
3ef2ca
--- 6672,6684 ----
3ef2ca
      win_T	*ewp;
3ef2ca
      int		p_crb_save;
3ef2ca
  
3ef2ca
+     /* There is a tiny chance that this gets called recursively: When
3ef2ca
+      * redrawing a status line triggers redrawing the ruler or tabline.
3ef2ca
+      * Avoid trouble by not allowing recursion. */
3ef2ca
+     if (entered)
3ef2ca
+ 	return;
3ef2ca
+     entered = TRUE;
3ef2ca
+ 
3ef2ca
      /* setup environment for the task at hand */
3ef2ca
      if (wp == NULL)
3ef2ca
      {
3ef2ca
***************
3ef2ca
*** 6746,6752 ****
3ef2ca
      }
3ef2ca
  
3ef2ca
      if (maxwidth <= 0)
3ef2ca
! 	return;
3ef2ca
  
3ef2ca
      /* Temporarily reset 'cursorbind', we don't want a side effect from moving
3ef2ca
       * the cursor away and back. */
3ef2ca
--- 6754,6760 ----
3ef2ca
      }
3ef2ca
  
3ef2ca
      if (maxwidth <= 0)
3ef2ca
! 	goto theend;
3ef2ca
  
3ef2ca
      /* Temporarily reset 'cursorbind', we don't want a side effect from moving
3ef2ca
       * the cursor away and back. */
3ef2ca
***************
3ef2ca
*** 6827,6832 ****
3ef2ca
--- 6835,6843 ----
3ef2ca
  	while (col < Columns)
3ef2ca
  	    TabPageIdxs[col++] = fillchar;
3ef2ca
      }
3ef2ca
+ 
3ef2ca
+ theend:
3ef2ca
+     entered = FALSE;
3ef2ca
  }
3ef2ca
  
3ef2ca
  #endif /* FEAT_STL_OPT */
3ef2ca
*** ../vim-7.4.117/src/version.c	2013-12-11 15:06:36.000000000 +0100
3ef2ca
--- src/version.c	2013-12-11 15:32:16.000000000 +0100
3ef2ca
***************
3ef2ca
*** 740,741 ****
3ef2ca
--- 740,743 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     118,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
Nothing is fool-proof to a sufficiently talented fool.
3ef2ca
3ef2ca
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3ef2ca
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3ef2ca
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
3ef2ca
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///