Karsten Hopp 6f49d7
To: vim_dev@googlegroups.com
Karsten Hopp 6f49d7
Subject: Patch 7.4.226
Karsten Hopp 6f49d7
Fcc: outbox
Karsten Hopp 6f49d7
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 6f49d7
Mime-Version: 1.0
Karsten Hopp 6f49d7
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 6f49d7
Content-Transfer-Encoding: 8bit
Karsten Hopp 6f49d7
------------
Karsten Hopp 6f49d7
Karsten Hopp 6f49d7
Patch 7.4.226 (after 7.4.219)
Karsten Hopp 6f49d7
Problem:    Cursurline highlighting not redrawn when scrolling. (John
Karsten Hopp 6f49d7
	    Marriott)
Karsten Hopp 6f49d7
Solution:   Check for required redraw in two places.
Karsten Hopp 6f49d7
Files:	    src/move.c
Karsten Hopp 6f49d7
Karsten Hopp 6f49d7
Karsten Hopp 6f49d7
*** ../vim-7.4.225/src/move.c	2014-03-27 12:11:43.888393741 +0100
Karsten Hopp 6f49d7
--- src/move.c	2014-03-28 21:45:56.958245561 +0100
Karsten Hopp 6f49d7
***************
Karsten Hopp 6f49d7
*** 20,25 ****
Karsten Hopp 6f49d7
--- 20,26 ----
Karsten Hopp 6f49d7
  #include "vim.h"
Karsten Hopp 6f49d7
  
Karsten Hopp 6f49d7
  static void comp_botline __ARGS((win_T *wp));
Karsten Hopp 6f49d7
+ static void redraw_for_cursorline __ARGS((win_T *wp));
Karsten Hopp 6f49d7
  static int scrolljump_value __ARGS((void));
Karsten Hopp 6f49d7
  static int check_top_offset __ARGS((void));
Karsten Hopp 6f49d7
  static void curs_rows __ARGS((win_T *wp, int do_botline));
Karsten Hopp 6f49d7
***************
Karsten Hopp 6f49d7
*** 106,111 ****
Karsten Hopp 6f49d7
--- 107,113 ----
Karsten Hopp 6f49d7
  #ifdef FEAT_FOLDING
Karsten Hopp 6f49d7
  	    wp->w_cline_folded = folded;
Karsten Hopp 6f49d7
  #endif
Karsten Hopp 6f49d7
+ 	    redraw_for_cursorline(wp);
Karsten Hopp 6f49d7
  	    wp->w_valid |= (VALID_CROW|VALID_CHEIGHT);
Karsten Hopp 6f49d7
  	}
Karsten Hopp 6f49d7
  	if (done + n > wp->w_height)
Karsten Hopp 6f49d7
***************
Karsten Hopp 6f49d7
*** 124,129 ****
Karsten Hopp 6f49d7
--- 126,152 ----
Karsten Hopp 6f49d7
  }
Karsten Hopp 6f49d7
  
Karsten Hopp 6f49d7
  /*
Karsten Hopp 6f49d7
+  * Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
Karsten Hopp 6f49d7
+  * set.
Karsten Hopp 6f49d7
+  */
Karsten Hopp 6f49d7
+     static void
Karsten Hopp 6f49d7
+ redraw_for_cursorline(wp)
Karsten Hopp 6f49d7
+     win_T *wp;
Karsten Hopp 6f49d7
+ {
Karsten Hopp 6f49d7
+     if ((wp->w_p_rnu
Karsten Hopp 6f49d7
+ #ifdef FEAT_SYN_HL
Karsten Hopp 6f49d7
+ 		|| wp->w_p_cul
Karsten Hopp 6f49d7
+ #endif
Karsten Hopp 6f49d7
+ 		)
Karsten Hopp 6f49d7
+ 	    && (wp->w_valid & VALID_CROW) == 0
Karsten Hopp 6f49d7
+ # ifdef FEAT_INS_EXPAND
Karsten Hopp 6f49d7
+ 	    && !pum_visible()
Karsten Hopp 6f49d7
+ # endif
Karsten Hopp 6f49d7
+ 	    )
Karsten Hopp 6f49d7
+ 	redraw_win_later(wp, SOME_VALID);
Karsten Hopp 6f49d7
+ }
Karsten Hopp 6f49d7
+ 
Karsten Hopp 6f49d7
+ /*
Karsten Hopp 6f49d7
   * Update curwin->w_topline and redraw if necessary.
Karsten Hopp 6f49d7
   * Used to update the screen before printing a message.
Karsten Hopp 6f49d7
   */
Karsten Hopp 6f49d7
***************
Karsten Hopp 6f49d7
*** 772,791 ****
Karsten Hopp 6f49d7
  	}
Karsten Hopp 6f49d7
      }
Karsten Hopp 6f49d7
  
Karsten Hopp 6f49d7
!     /* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
Karsten Hopp 6f49d7
!      * set. */
Karsten Hopp 6f49d7
!     if ((curwin->w_p_rnu
Karsten Hopp 6f49d7
! #ifdef FEAT_SYN_HL
Karsten Hopp 6f49d7
! 		|| curwin->w_p_cul
Karsten Hopp 6f49d7
! #endif
Karsten Hopp 6f49d7
! 		)
Karsten Hopp 6f49d7
! 	    && (curwin->w_valid & VALID_CROW) == 0
Karsten Hopp 6f49d7
! # ifdef FEAT_INS_EXPAND
Karsten Hopp 6f49d7
! 	    && !pum_visible()
Karsten Hopp 6f49d7
! # endif
Karsten Hopp 6f49d7
! 	    )
Karsten Hopp 6f49d7
! 	redraw_later(SOME_VALID);
Karsten Hopp 6f49d7
! 
Karsten Hopp 6f49d7
      wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
Karsten Hopp 6f49d7
  
Karsten Hopp 6f49d7
      /* validate botline too, if update_screen doesn't do it */
Karsten Hopp 6f49d7
--- 795,801 ----
Karsten Hopp 6f49d7
  	}
Karsten Hopp 6f49d7
      }
Karsten Hopp 6f49d7
  
Karsten Hopp 6f49d7
!     redraw_for_cursorline(curwin);
Karsten Hopp 6f49d7
      wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
Karsten Hopp 6f49d7
  
Karsten Hopp 6f49d7
      /* validate botline too, if update_screen doesn't do it */
Karsten Hopp 6f49d7
***************
Karsten Hopp 6f49d7
*** 2504,2511 ****
Karsten Hopp 6f49d7
  		    }
Karsten Hopp 6f49d7
  		    comp_botline(curwin);
Karsten Hopp 6f49d7
  		    curwin->w_cursor.lnum = curwin->w_botline - 1;
Karsten Hopp 6f49d7
! 		    curwin->w_valid &= ~(VALID_WCOL|VALID_CHEIGHT|
Karsten Hopp 6f49d7
! 			    VALID_WROW|VALID_CROW);
Karsten Hopp 6f49d7
  		}
Karsten Hopp 6f49d7
  		else
Karsten Hopp 6f49d7
  		{
Karsten Hopp 6f49d7
--- 2514,2521 ----
Karsten Hopp 6f49d7
  		    }
Karsten Hopp 6f49d7
  		    comp_botline(curwin);
Karsten Hopp 6f49d7
  		    curwin->w_cursor.lnum = curwin->w_botline - 1;
Karsten Hopp 6f49d7
! 		    curwin->w_valid &=
Karsten Hopp 6f49d7
! 			    ~(VALID_WCOL|VALID_CHEIGHT|VALID_WROW|VALID_CROW);
Karsten Hopp 6f49d7
  		}
Karsten Hopp 6f49d7
  		else
Karsten Hopp 6f49d7
  		{
Karsten Hopp 6f49d7
*** ../vim-7.4.225/src/version.c	2014-03-27 19:08:52.008777244 +0100
Karsten Hopp 6f49d7
--- src/version.c	2014-03-28 21:48:45.330248141 +0100
Karsten Hopp 6f49d7
***************
Karsten Hopp 6f49d7
*** 736,737 ****
Karsten Hopp 6f49d7
--- 736,739 ----
Karsten Hopp 6f49d7
  {   /* Add new patch number below this line */
Karsten Hopp 6f49d7
+ /**/
Karsten Hopp 6f49d7
+     226,
Karsten Hopp 6f49d7
  /**/
Karsten Hopp 6f49d7
Karsten Hopp 6f49d7
-- 
Karsten Hopp 6f49d7
Bad fashion can discourage normal people from interacting with the engineer
Karsten Hopp 6f49d7
and talking about the cute things their children do.
Karsten Hopp 6f49d7
				(Scott Adams - The Dilbert principle)
Karsten Hopp 6f49d7
Karsten Hopp 6f49d7
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 6f49d7
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 6f49d7
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 6f49d7
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///