mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 15:08:35 +00:00
vim-patch:9.1.0215: Half-page scrolling does not support smooth-scrolling
Problem: Page-wise scrolling with Ctrl-D/Ctrl-U implements
it's own logic to change the topline and cursor.
More logic than necessary for scrolling with Ctrl-F/Ctrl-B
was removed in patch 9.1.0211.
Solution: Re-use the logic from Ctrl-E/Ctrl-Y/Ctrl-F/Ctrl-B while
staying backward compatible as much as possible.
Restore some of the logic that determined how many lines will
be scrolled (Luuk van Baal)
5a2e3ec9ac
This commit is contained in:
@@ -4193,7 +4193,7 @@ static void ins_pageup(void)
|
||||
}
|
||||
|
||||
pos_T tpos = curwin->w_cursor;
|
||||
if (onepage(BACKWARD, 1) == OK) {
|
||||
if (pagescroll(BACKWARD, 1, false) == OK) {
|
||||
start_arrow(&tpos);
|
||||
can_cindent = true;
|
||||
} else {
|
||||
@@ -4238,7 +4238,7 @@ static void ins_pagedown(void)
|
||||
}
|
||||
|
||||
pos_T tpos = curwin->w_cursor;
|
||||
if (onepage(FORWARD, 1) == OK) {
|
||||
if (pagescroll(FORWARD, 1, false) == OK) {
|
||||
start_arrow(&tpos);
|
||||
can_cindent = true;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user