lkundrak / rpms / vim

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