diff options
author | oni-link <knil.ino@gmail.com> | 2014-04-03 13:21:05 +0200 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-06 06:56:13 -0300 |
commit | 74f54d78d98dedaad8e44d0ef1553cc0633d1bf3 (patch) | |
tree | 3b0d3e07db6296585863f3f2bb6b97e514f537ca | |
parent | e76249c813192aa082060d024b66f11d95d09b51 (diff) | |
download | rneovim-74f54d78d98dedaad8e44d0ef1553cc0633d1bf3.tar.gz rneovim-74f54d78d98dedaad8e44d0ef1553cc0633d1bf3.tar.bz2 rneovim-74f54d78d98dedaad8e44d0ef1553cc0633d1bf3.zip |
vim-patch:7.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)
https://code.google.com/p/vim/source/detail?r=233ad7b960d0fbeb224b383918113b25c74ebe35
-rw-r--r-- | src/move.c | 3 | ||||
-rw-r--r-- | src/version.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/move.c b/src/move.c index 3d0060fac8..47b9c63f80 100644 --- a/src/move.c +++ b/src/move.c @@ -1614,6 +1614,7 @@ void scroll_cursor_halfway(int atend) int used; lineoff_T loff; lineoff_T boff; + linenr_T old_topline = curwin->w_topline; loff.lnum = boff.lnum = curwin->w_cursor.lnum; (void)hasFolding(loff.lnum, &loff.lnum, &boff.lnum); @@ -1652,6 +1653,8 @@ void scroll_cursor_halfway(int atend) if (!hasFolding(topline, &curwin->w_topline, NULL)) curwin->w_topline = topline; curwin->w_topfill = topfill; + if (old_topline > curwin->w_topline + curwin->w_height) + curwin->w_botfill = FALSE; check_topfill(curwin, FALSE); curwin->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP); curwin->w_valid |= VALID_TOPLINE; diff --git a/src/version.c b/src/version.c index 5a7ba54024..a80bf9f1fa 100644 --- a/src/version.c +++ b/src/version.c @@ -202,6 +202,7 @@ static char *(features[]) = { static int included_patches[] = { // Add new patch number below this line + 173, 172, 171, 170, |