diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-02-11 15:47:46 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-02-11 15:47:46 +0100 |
commit | 12a0f22340ef1b0fa9a4e96d918e282c3d9c2c4e (patch) | |
tree | 32cf6b5e46764f9e2a14fcbb5f6a4a4bb52c98f9 /src/move.c | |
parent | 4d504a3e11c42ca1f7ad29848b943eb1537283cb (diff) | |
download | vim-git-12a0f22340ef1b0fa9a4e96d918e282c3d9c2c4e.tar.gz |
updated for version 7.4.173v7.4.173
Problem: When using scrollbind the cursor can end up below the last line.
(mvxxc)
Solution: Reset w_botfill when scrolling up. (Christian Brabandt)
Diffstat (limited to 'src/move.c')
-rw-r--r-- | src/move.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/move.c b/src/move.c index 5c8257449..3a75ce36a 100644 --- a/src/move.c +++ b/src/move.c @@ -2101,6 +2101,7 @@ scroll_cursor_halfway(atend) int used; lineoff_T loff; lineoff_T boff; + linenr_T old_topline = curwin->w_topline; loff.lnum = boff.lnum = curwin->w_cursor.lnum; #ifdef FEAT_FOLDING @@ -2156,6 +2157,8 @@ scroll_cursor_halfway(atend) curwin->w_topline = topline; #ifdef FEAT_DIFF curwin->w_topfill = topfill; + if (old_topline > curwin->w_topline + curwin->w_height) + curwin->w_botfill = FALSE; check_topfill(curwin, FALSE); #endif curwin->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP); |