Commit 5a9b14eb authored by Jason Crain's avatar Jason Crain

ev-view.c: keep cursor visible when changing pages

When zoomed in in non-continuous mode, the caret cursor is sometimes not
visible after moving it to the next or previous page with the up and
down arrow keys.

Call `ensure_rectangle_is_visible` when changing to the next page, not
only when changing to the previous page. Adjust `rect` for the
coordinate difference between the window and the view's scrolling
parent f44a2bd5
Pipeline #36458 passed with stage
in 7 minutes and 58 seconds
......@@ -6446,11 +6446,13 @@ ev_view_move_cursor (EvView *view,
} else if (prev_page > view->cursor_page) {
ev_view_previous_page (view);
cursor_go_to_page_end (view);
ensure_rectangle_is_visible (view, &rect);
changed_page = TRUE;
if (changed_page) {
rect.x += view->scroll_x;
rect.y += view->scroll_y;
ensure_rectangle_is_visible (view, &rect);
g_signal_emit (view, signals[SIGNAL_CURSOR_MOVED], 0, view->cursor_page, view->cursor_offset);
clear_selection (view);
return TRUE;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment