Blame SOURCES/7.4.219

22c937
To: vim_dev@googlegroups.com
22c937
Subject: Patch 7.4.219
22c937
Fcc: outbox
22c937
From: Bram Moolenaar <Bram@moolenaar.net>
22c937
Mime-Version: 1.0
22c937
Content-Type: text/plain; charset=UTF-8
22c937
Content-Transfer-Encoding: 8bit
22c937
------------
22c937
22c937
Patch 7.4.219
22c937
Problem:    When 'relativenumber' or 'cursorline' are set the window is
22c937
	    redrawn much to often. (Patrick Hemmer, Dominique Pelle)
22c937
Solution:   Check the VALID_CROW flag instead of VALID_WROW.
22c937
Files:	    src/move.c
22c937
22c937
22c937
*** ../vim-7.4.218/src/move.c	2014-03-23 15:12:29.927264336 +0100
22c937
--- src/move.c	2014-03-27 11:59:28.524382473 +0100
22c937
***************
22c937
*** 772,777 ****
22c937
--- 772,791 ----
22c937
  	}
22c937
      }
22c937
  
22c937
+     /* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
22c937
+      * set. */
22c937
+     if ((curwin->w_p_rnu
22c937
+ #ifdef FEAT_SYN_HL
22c937
+ 		|| curwin->w_p_cul
22c937
+ #endif
22c937
+ 		)
22c937
+ 	    && (curwin->w_valid & VALID_CROW) == 0
22c937
+ # ifdef FEAT_INS_EXPAND
22c937
+ 	    && !pum_visible()
22c937
+ # endif
22c937
+ 	    )
22c937
+ 	redraw_later(SOME_VALID);
22c937
+ 
22c937
      wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
22c937
  
22c937
      /* validate botline too, if update_screen doesn't do it */
22c937
***************
22c937
*** 1172,1193 ****
22c937
      if (prev_skipcol != curwin->w_skipcol)
22c937
  	redraw_later(NOT_VALID);
22c937
  
22c937
-     /* Redraw when w_row changes and 'relativenumber' is set */
22c937
-     if (((curwin->w_valid & VALID_WROW) == 0 && (curwin->w_p_rnu
22c937
  #ifdef FEAT_SYN_HL
22c937
! 	/* or when w_row changes and 'cursorline' is set. */
22c937
! 						|| curwin->w_p_cul
22c937
! #endif
22c937
! 	))
22c937
! #ifdef FEAT_SYN_HL
22c937
! 	/* or when w_virtcol changes and 'cursorcolumn' is set */
22c937
! 	|| (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0)
22c937
! #endif
22c937
! 	)
22c937
  # ifdef FEAT_INS_EXPAND
22c937
! 	    if (!pum_visible())
22c937
  # endif
22c937
! 		redraw_later(SOME_VALID);
22c937
  
22c937
      curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
22c937
  }
22c937
--- 1186,1200 ----
22c937
      if (prev_skipcol != curwin->w_skipcol)
22c937
  	redraw_later(NOT_VALID);
22c937
  
22c937
  #ifdef FEAT_SYN_HL
22c937
!     /* Redraw when w_virtcol changes and 'cursorcolumn' is set */
22c937
!     if (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0
22c937
  # ifdef FEAT_INS_EXPAND
22c937
! 	    && !pum_visible()
22c937
  # endif
22c937
! 	)
22c937
! 	redraw_later(SOME_VALID);
22c937
! #endif
22c937
  
22c937
      curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
22c937
  }
22c937
*** ../vim-7.4.218/src/version.c	2014-03-25 18:23:27.062087691 +0100
22c937
--- src/version.c	2014-03-27 12:11:15.276393302 +0100
22c937
***************
22c937
*** 736,737 ****
22c937
--- 736,739 ----
22c937
  {   /* Add new patch number below this line */
22c937
+ /**/
22c937
+     219,
22c937
  /**/
22c937
22c937
-- 
22c937
The only way the average employee can speak to an executive is by taking a
22c937
second job as a golf caddie.
22c937
				(Scott Adams - The Dilbert principle)
22c937
22c937
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
22c937
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
22c937
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
22c937
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///