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