From 622040374e9c66099f3d316033cbc03713fffa4f Mon Sep 17 00:00:00 2001 From: Tim Siegel Date: Thu, 11 Feb 2021 14:22:28 -0500 Subject: [PATCH] Account for page padding on full scroll Fixes #52 --- zathura/shortcuts.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zathura/shortcuts.c b/zathura/shortcuts.c index 28a2b3a..61fa695 100644 --- a/zathura/shortcuts.c +++ b/zathura/shortcuts.c @@ -587,8 +587,9 @@ sc_scroll(girara_session_t* session, girara_argument_t* argument, direction = -1.0; } - const double vstep = (double)view_height / (double)doc_height; - const double hstep = (double)view_width / (double)doc_width; + unsigned int pad = zathura_document_get_page_padding(zathura->document); + const double vstep = (double)(view_height + pad) / (double)doc_height; + const double hstep = (double)(view_width + pad) / (double)doc_width; /* compute new position */ switch (argument->n) {