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
parent
43a5c87682
commit
8b1f283a73
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue