diff --git a/shortcuts.c b/shortcuts.c index 519c0e6..9b3981f 100644 --- a/shortcuts.c +++ b/shortcuts.c @@ -637,13 +637,15 @@ sc_jumplist(girara_session_t* session, girara_argument_t* argument, girara_event break; } - page_set(zathura, jump->page); - position_set_delayed(zathura, jump->x, jump->y); + if (jump != NULL) { + page_set(zathura, jump->page); + const double s = zathura_document_get_scale(zathura->document); + position_set_delayed(zathura, jump->x * s, jump->y * s); + } return false; } - bool sc_search(girara_session_t* session, girara_argument_t* argument, girara_event_t* UNUSED(event), unsigned int UNUSED(t)) diff --git a/zathura.c b/zathura.c index 38454b0..2da5122 100644 --- a/zathura.c +++ b/zathura.c @@ -1130,7 +1130,7 @@ zathura_jumplist_save(zathura_t* zathura) { GtkAdjustment* view_hadjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); cur->page = pagenum; - cur->x = gtk_adjustment_get_value(view_hadjustment); - cur->y = gtk_adjustment_get_value(view_vadjustment); + cur->x = gtk_adjustment_get_value(view_hadjustment) / zathura_document_get_scale(zathura->document); + cur->y = gtk_adjustment_get_value(view_vadjustment) / zathura_document_get_scale(zathura->document);; } }