diff src/move.c @ 6247:fe1827921d50 v7.4.458

updated for version 7.4.458 Problem: Issue 252: Cursor moves in a zero-height window. Solution: Check for zero height. (idea by Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Tue, 23 Sep 2014 18:37:56 +0200
parents b650f2db8f96
children 7cda721eadb0
line wrap: on
line diff
--- a/src/move.c
+++ b/src/move.c
@@ -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;