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:
Abdo Roig-Maranges 2013-04-01 02:08:06 +02:00 committed by Sebastian Ramacher
parent 8e9631946d
commit 1c3274bbd6

View file

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