3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.219
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.219
3ef2ca
Problem:    When 'relativenumber' or 'cursorline' are set the window is
3ef2ca
	    redrawn much to often. (Patrick Hemmer, Dominique Pelle)
3ef2ca
Solution:   Check the VALID_CROW flag instead of VALID_WROW.
3ef2ca
Files:	    src/move.c
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.218/src/move.c	2014-03-23 15:12:29.927264336 +0100
3ef2ca
--- src/move.c	2014-03-27 11:59:28.524382473 +0100
3ef2ca
***************
3ef2ca
*** 772,777 ****
3ef2ca
--- 772,791 ----
3ef2ca
  	}
3ef2ca
      }
3ef2ca
  
3ef2ca
+     /* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
3ef2ca
+      * set. */
3ef2ca
+     if ((curwin->w_p_rnu
3ef2ca
+ #ifdef FEAT_SYN_HL
3ef2ca
+ 		|| curwin->w_p_cul
3ef2ca
+ #endif
3ef2ca
+ 		)
3ef2ca
+ 	    && (curwin->w_valid & VALID_CROW) == 0
3ef2ca
+ # ifdef FEAT_INS_EXPAND
3ef2ca
+ 	    && !pum_visible()
3ef2ca
+ # endif
3ef2ca
+ 	    )
3ef2ca
+ 	redraw_later(SOME_VALID);
3ef2ca
+ 
3ef2ca
      wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
3ef2ca
  
3ef2ca
      /* validate botline too, if update_screen doesn't do it */
3ef2ca
***************
3ef2ca
*** 1172,1193 ****
3ef2ca
      if (prev_skipcol != curwin->w_skipcol)
3ef2ca
  	redraw_later(NOT_VALID);
3ef2ca
  
3ef2ca
-     /* Redraw when w_row changes and 'relativenumber' is set */
3ef2ca
-     if (((curwin->w_valid & VALID_WROW) == 0 && (curwin->w_p_rnu
3ef2ca
  #ifdef FEAT_SYN_HL
3ef2ca
! 	/* or when w_row changes and 'cursorline' is set. */
3ef2ca
! 						|| curwin->w_p_cul
3ef2ca
! #endif
3ef2ca
! 	))
3ef2ca
! #ifdef FEAT_SYN_HL
3ef2ca
! 	/* or when w_virtcol changes and 'cursorcolumn' is set */
3ef2ca
! 	|| (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0)
3ef2ca
! #endif
3ef2ca
! 	)
3ef2ca
  # ifdef FEAT_INS_EXPAND
3ef2ca
! 	    if (!pum_visible())
3ef2ca
  # endif
3ef2ca
! 		redraw_later(SOME_VALID);
3ef2ca
  
3ef2ca
      curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
3ef2ca
  }
3ef2ca
--- 1186,1200 ----
3ef2ca
      if (prev_skipcol != curwin->w_skipcol)
3ef2ca
  	redraw_later(NOT_VALID);
3ef2ca
  
3ef2ca
  #ifdef FEAT_SYN_HL
3ef2ca
!     /* Redraw when w_virtcol changes and 'cursorcolumn' is set */
3ef2ca
!     if (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0
3ef2ca
  # ifdef FEAT_INS_EXPAND
3ef2ca
! 	    && !pum_visible()
3ef2ca
  # endif
3ef2ca
! 	)
3ef2ca
! 	redraw_later(SOME_VALID);
3ef2ca
! #endif
3ef2ca
  
3ef2ca
      curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
3ef2ca
  }
3ef2ca
*** ../vim-7.4.218/src/version.c	2014-03-25 18:23:27.062087691 +0100
3ef2ca
--- src/version.c	2014-03-27 12:11:15.276393302 +0100
3ef2ca
***************
3ef2ca
*** 736,737 ****
3ef2ca
--- 736,739 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     219,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
The only way the average employee can speak to an executive is by taking a
3ef2ca
second job as a golf caddie.
3ef2ca
				(Scott Adams - The Dilbert principle)
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    ///