diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-09-23 18:37:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-09-23 18:37:56 +0200 |
commit | cfc216e7b00690805aef8683fab000654937191d (patch) | |
tree | 03c4385167292f84719a2dacd3be469237fcee62 | |
parent | 1db60c47d9a0f14f4586702bfd8fccd8ea96f83f (diff) | |
download | vim-git-cfc216e7b00690805aef8683fab000654937191d.tar.gz |
updated for version 7.4.458v7.4.458
Problem: Issue 252: Cursor moves in a zero-height window.
Solution: Check for zero height. (idea by Christian Brabandt)
-rw-r--r-- | src/move.c | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 14 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; diff --git a/src/version.c b/src/version.c index bca37f54f..867aa7c3f 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 458, +/**/ 457, /**/ 456, |