mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-11 06:33:47 +01:00
properly set horizontal position when navigating
Call cb_view_hadjustment_changed to set horizontal position in navigation shortcuts: sc_navigate, sc_goto. Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
8e9631946d
commit
1c3274bbd6
@ -327,6 +327,10 @@ sc_goto(girara_session_t* session, girara_argument_t* argument, girara_event_t*
|
||||
page_set(zathura, zathura_document_get_number_of_pages(zathura->document) - 1);
|
||||
}
|
||||
|
||||
/* adjust horizontal position */
|
||||
GtkAdjustment* hadjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(session->gtk.view));
|
||||
cb_view_hadjustment_changed(hadjustment, zathura);
|
||||
|
||||
zathura_jumplist_add(zathura);
|
||||
|
||||
return false;
|
||||
@ -463,6 +467,10 @@ sc_navigate(girara_session_t* session, girara_argument_t* argument,
|
||||
|
||||
page_set(zathura, new_page);
|
||||
|
||||
/* adjust horizontal position */
|
||||
GtkAdjustment* hadjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(session->gtk.view));
|
||||
cb_view_hadjustment_changed(hadjustment, zathura);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user