summaryrefslogtreecommitdiff
path: root/src/move.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/move.c')
-rw-r--r--src/move.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/move.c b/src/move.c
index 42f778438..2e0efeca3 100644
--- 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;