jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.118

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