]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.309 v7.4.309
authorBram Moolenaar <Bram@vim.org>
Wed, 28 May 2014 11:43:04 +0000 (13:43 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 28 May 2014 11:43:04 +0000 (13:43 +0200)
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)

src/version.c
src/window.c

index f72ae97f2833e99fff8274472bd37084ef488555..403a6e474c62ffbced53e25626f03990684d9c1a 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    309,
 /**/
     308,
 /**/
index cea7c402d947d5c8aa161f5416fb438f46dc9f04..856e7c45969fb7a86370f300e8ad630dc6bbb803 100644 (file)
@@ -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)