From 1c3274bbd6893844c0b290f7b220a302854ff350 Mon Sep 17 00:00:00 2001 From: Abdo Roig-Maranges Date: Mon, 1 Apr 2013 02:08:06 +0200 Subject: [PATCH] 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 --- shortcuts.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shortcuts.c b/shortcuts.c index 04ec7e7..8e295f9 100644 --- a/shortcuts.c +++ b/shortcuts.c @@ -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; }