changeset 5936:88a6e9f33822 v7.4.309

updated for version 7.4.309 Problem: When increasing the size of the lower window, the upper window jumps back to the top. (Ron Aaron) Solution: Change setting the topline. (Nobuhiro Takasaki)
author Bram Moolenaar <bram@vim.org>
date Wed, 28 May 2014 13:43:04 +0200
parents 7b9be1f04626
children dd7113658e9e
files src/version.c src/window.c
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    309,
+/**/
     308,
 /**/
     307,
--- a/src/window.c
+++ b/src/window.c
@@ -5710,8 +5710,9 @@ win_new_height(wp, height)
 		    --wp->w_wrow;
 		}
 	    }
+            set_topline(wp, lnum);
 	}
-	else
+	else if (sline > 0)
 	{
 	    while (sline > 0 && lnum > 1)
 	    {
@@ -5748,14 +5749,15 @@ win_new_height(wp, height)
 		lnum++;
 		wp->w_wrow -= line_size + sline;
 	    }
-	    else if (sline >= 0)
+	    else if (sline > 0)
 	    {
 		/* First line of file reached, use that as topline. */
 		lnum = 1;
 		wp->w_wrow -= sline;
 	    }
+
+            set_topline(wp, lnum);
 	}
-	set_topline(wp, lnum);
     }
 
     if (wp == curwin)