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)
closes: #14316
Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/edit.c b/src/edit.c
index c7f90da..56643a9 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -4807,7 +4807,7 @@
}
tpos = curwin->w_cursor;
- if (onepage(BACKWARD, 1L) == OK)
+ if (pagescroll(BACKWARD, 1L, FALSE) == OK)
{
start_arrow(&tpos);
can_cindent = TRUE;
@@ -4864,7 +4864,7 @@
}
tpos = curwin->w_cursor;
- if (onepage(FORWARD, 1L) == OK)
+ if (pagescroll(FORWARD, 1L, FALSE) == OK)
{
start_arrow(&tpos);
can_cindent = TRUE;