On 27-Mar-2014 10:13 PM, Bram Moolenaar wrote:

Patch 7.4.219
Problem:    When 'relativenumber' or 'cursorline' are set the window is
            redrawn much to often. (Patrick Hemmer, Dominique Pelle)
Solution:   Check the VALID_CROW flag instead of VALID_WROW.
Files:      src/move.c


*** ../vim-7.4.218/src/move.c   2014-03-23 15:12:29.927264336 +0100
--- src/move.c  2014-03-27 11:59:28.524382473 +0100
***************
*** 772,777 ****
--- 772,791 ----
        }
       }

+     /* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
+      * set. */
+     if ((curwin->w_p_rnu
+ #ifdef FEAT_SYN_HL
+               || curwin->w_p_cul
+ #endif
+               )
+           && (curwin->w_valid & VALID_CROW) == 0
+ # ifdef FEAT_INS_EXPAND
+           && !pum_visible()
+ # endif
+           )
+       redraw_later(SOME_VALID);
+
       wp->w_valid |= VALID_CROW|VALID_CHEIGHT;

       /* validate botline too, if update_screen doesn't do it */
***************
*** 1172,1193 ****
       if (prev_skipcol != curwin->w_skipcol)
        redraw_later(NOT_VALID);

-     /* Redraw when w_row changes and 'relativenumber' is set */
-     if (((curwin->w_valid & VALID_WROW) == 0 && (curwin->w_p_rnu
   #ifdef FEAT_SYN_HL
!       /* or when w_row changes and 'cursorline' is set. */
!                                               || curwin->w_p_cul
! #endif
!       ))
! #ifdef FEAT_SYN_HL
!       /* or when w_virtcol changes and 'cursorcolumn' is set */
!       || (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0)
! #endif
!       )
   # ifdef FEAT_INS_EXPAND
!           if (!pum_visible())
   # endif
!               redraw_later(SOME_VALID);

       curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
   }
--- 1186,1200 ----
       if (prev_skipcol != curwin->w_skipcol)
        redraw_later(NOT_VALID);

   #ifdef FEAT_SYN_HL
!     /* Redraw when w_virtcol changes and 'cursorcolumn' is set */
!     if (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0
   # ifdef FEAT_INS_EXPAND
!           && !pum_visible()
   # endif
!       )
!       redraw_later(SOME_VALID);
! #endif

       curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
   }
*** ../vim-7.4.218/src/version.c        2014-03-25 18:23:27.062087691 +0100
--- src/version.c       2014-03-27 12:11:15.276393302 +0100
***************
*** 736,737 ****
--- 736,739 ----
   {   /* Add new patch number below this line */
+ /**/
+     219,
   /**/


Hi All,

I see a problem with the cursorline highlight after applying this patch when scrolling upwards off the top of the view. The cursorline highlight separates from the cursor itself when the display scrolls after using the up arrow key.

To repro:
1. Open a file such that the file is larger than the view.
2. Set cursorline if not already on.
3. Move someway down through the file so that the view has scrolled of the top of the file. 4. Scroll upwards using the up arrow key. The cursorline an cursor remain together, but when the cursor reaches the top of the view and the display scrolls downward the cursor continues to move upward but the cursorline remains where it was when the scrolling started.

I see the same behaviour in gvim (Windows 8.1 64bit) and vim (HP-UX).

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui