diff src/move.c @ 5653:233ad7b960d0 v7.4.173

updated for version 7.4.173 Problem: When using scrollbind the cursor can end up below the last line. (mvxxc) Solution: Reset w_botfill when scrolling up. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Tue, 11 Feb 2014 15:47:46 +0100
parents e2d36f345a7f
children df3b0b70d8c1
line wrap: on
line diff
--- a/src/move.c
+++ b/src/move.c
@@ -2101,6 +2101,7 @@ scroll_cursor_halfway(atend)
     int		used;
     lineoff_T	loff;
     lineoff_T	boff;
+    linenr_T	old_topline = curwin->w_topline;
 
     loff.lnum = boff.lnum = curwin->w_cursor.lnum;
 #ifdef FEAT_FOLDING
@@ -2156,6 +2157,8 @@ scroll_cursor_halfway(atend)
 	curwin->w_topline = topline;
 #ifdef FEAT_DIFF
     curwin->w_topfill = topfill;
+    if (old_topline > curwin->w_topline + curwin->w_height)
+	curwin->w_botfill = FALSE;
     check_topfill(curwin, FALSE);
 #endif
     curwin->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP);