commit 8b1f283a73ddbcef926e4b581bbefb3475e9c203
parent 43a5c8768263a63febe0653ff4aac395c2adbefe
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Sun, 16 Jul 2017 15:40:19 -0500
moving: fix the cursor jumping back and forth with non-smooth paging
Since commit 8490f4ac, get_edge_and_target() depends on an up-to-date
current_x. So: make sure current_x is updated when we move to the
top left of the screen to start a non-smooth PageUp or PageDown.
This fixes https://savannah.gnu.org/bugs/?51480.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/move.c b/src/move.c
@@ -74,6 +74,8 @@ void do_page_up(void)
if (!ISSET(SMOOTH_SCROLL)) {
openfile->current = openfile->edittop;
openfile->placewewant = openfile->firstcolumn;
+ openfile->current_x = actual_x(openfile->current->data,
+ openfile->firstcolumn);
openfile->current_y = 0;
}
@@ -106,6 +108,8 @@ void do_page_down(void)
if (!ISSET(SMOOTH_SCROLL)) {
openfile->current = openfile->edittop;
openfile->placewewant = openfile->firstcolumn;
+ openfile->current_x = actual_x(openfile->current->data,
+ openfile->firstcolumn);
openfile->current_y = 0;
}