diff src/move.c @ 1980:5e0c164fc1c2 v7.2.277

updated for version 7.2-277
author vimboss
date Tue, 03 Nov 2009 15:23:14 +0000
parents b5c1cb6f8d56
children 4483ee552619
line wrap: on
line diff
--- a/src/move.c
+++ b/src/move.c
@@ -183,9 +183,6 @@ update_topline()
 	if (curwin->w_topline != 1)
 	    redraw_later(NOT_VALID);
 	curwin->w_topline = 1;
-#ifdef FEAT_DIFF
-	curwin->w_topfill = 0;
-#endif
 	curwin->w_botline = 2;
 	curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP;
 #ifdef FEAT_SCROLLBIND
@@ -1257,7 +1254,8 @@ scrolldown(line_count, byfold)
     while (line_count-- > 0)
     {
 #ifdef FEAT_DIFF
-	if (curwin->w_topfill < diff_check(curwin, curwin->w_topline))
+	if (curwin->w_topfill < diff_check(curwin, curwin->w_topline)
+		&& curwin->w_topfill < curwin->w_height - 1)
 	{
 	    ++curwin->w_topfill;
 	    ++done;