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.
master
David Lawrence Ramsey 2017-07-16 15:40:19 -05:00 committed by Benno Schulenberg
parent 43a5c87682
commit 8b1f283a73
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}