diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-12-23 15:03:08 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-12-23 15:03:08 -0500 |
commit | 4f6bb8a9a997aacbe9f9f1ca83e7e4c502bdc03c (patch) | |
tree | 20651663650de0bf7f112c000015622e191268e0 /src/nvim/move.c | |
parent | 44fabac4e0fd5567691d1e7c69da8db156936996 (diff) | |
parent | 1f73d7cb85a48a650a00b18a7f987954209a4d52 (diff) | |
download | rneovim-4f6bb8a9a997aacbe9f9f1ca83e7e4c502bdc03c.tar.gz rneovim-4f6bb8a9a997aacbe9f9f1ca83e7e4c502bdc03c.tar.bz2 rneovim-4f6bb8a9a997aacbe9f9f1ca83e7e4c502bdc03c.zip |
Merge pull request #1727 from fwalch/small-patches
vim-patch: Multiple small patches
Diffstat (limited to 'src/nvim/move.c')
-rw-r--r-- | src/nvim/move.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c index 95b961e52c..40f301e595 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -146,6 +146,15 @@ void update_topline(void) 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; + curwin->w_scbind_pos = 1; + return; + } + check_cursor_moved(curwin); if (curwin->w_valid & VALID_TOPLINE) return; |