Commit e79a4845 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Honor the current zoom level.

Otherwise jump positions are off after changing the zoom level.
parent af044328
......@@ -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))
......
......@@ -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);;
}
}
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