diff options
author | Florian Walch <florian@fwalch.com> | 2014-12-23 12:14:01 +0100 |
---|---|---|
committer | Florian Walch <florian@fwalch.com> | 2014-12-23 16:13:30 +0100 |
commit | 2fefb5e7d343f21cfc64f299b032a679fbd27ef9 (patch) | |
tree | 4862c40d5c1a84c5674c75910114fd5d944defd0 /src/nvim/move.c | |
parent | 0158539c77eec5cba2622bb929e32c84646866dc (diff) | |
download | rneovim-2fefb5e7d343f21cfc64f299b032a679fbd27ef9.tar.gz rneovim-2fefb5e7d343f21cfc64f299b032a679fbd27ef9.tar.bz2 rneovim-2fefb5e7d343f21cfc64f299b032a679fbd27ef9.zip |
vim-patch:7.4.458
Problem: Issue 252: Cursor moves in a zero-height window.
Solution: Check for zero height. (idea by Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-458
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; |