]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.458 v7.4.458
authorBram Moolenaar <Bram@vim.org>
Tue, 23 Sep 2014 16:37:56 +0000 (18:37 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 23 Sep 2014 16:37:56 +0000 (18:37 +0200)
Problem:    Issue 252: Cursor moves in a zero-height window.
Solution:   Check for zero height. (idea by Christian Brabandt)

src/move.c
src/version.c

index 42f778438fc4021ce4d7a26c6a00920f2eaf5c96..2e0efeca3c629cb1d6b45d0f8fa18093d684b443 100644 (file)
@@ -183,6 +183,18 @@ update_topline()
     if (!screen_valid(TRUE))
        return;
 
+    /* If the window height is zero just use the cursor line. */
+    if (curwin->w_height == 0)
+    {
+       curwin->w_topline = curwin->w_cursor.lnum;
+       curwin->w_botline = curwin->w_topline;
+       curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP;
+#ifdef FEAT_SCROLLBIND
+       curwin->w_scbind_pos = 1;
+#endif
+       return;
+    }
+
     check_cursor_moved(curwin);
     if (curwin->w_valid & VALID_TOPLINE)
        return;
index bca37f54fa5260a26c8b6a105cfc57b7024afb03..867aa7c3fd19cee2f3ffad91bee5fb73ce51c1ea 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    458,
 /**/
     457,
 /**/