diff --git a/config.c b/config.c index 707d840..9492c20 100644 --- a/config.c +++ b/config.c @@ -145,6 +145,8 @@ config_load_default(zathura_t* zathura) girara_setting_add(gsession, "scroll-step", &float_value, FLOAT, false, _("Scroll step"), NULL, NULL); float_value = -1; girara_setting_add(gsession, "scroll-hstep", &float_value, FLOAT, false, _("Horizontal scroll step"), NULL, NULL); + float_value = 0.1; + girara_setting_add(gsession, "scroll-full-overlap", &float_value, FLOAT, false, _("Full page scroll overlap"), NULL, NULL); int_value = 10; girara_setting_add(gsession, "zoom-min", &int_value, INT, false, _("Zoom minimum"), NULL, NULL); int_value = 1000; diff --git a/shortcuts.c b/shortcuts.c index 1f90f7a..bbb34b0 100644 --- a/shortcuts.c +++ b/shortcuts.c @@ -563,6 +563,9 @@ sc_scroll(girara_session_t* session, girara_argument_t* argument, if (scroll_hstep < 0) { scroll_hstep = scroll_step; } + float scroll_full_overlap = 0.1; + girara_setting_get(session, "scroll-full-overlap", &scroll_full_overlap); + int padding = 1; girara_setting_get(session, "page-padding", &padding); @@ -571,11 +574,11 @@ sc_scroll(girara_session_t* session, girara_argument_t* argument, switch(argument->n) { case FULL_UP: case FULL_LEFT: - new_value = value - view_size - padding; + new_value = value - (1.0 - scroll_full_overlap) * view_size - padding; break; case FULL_DOWN: case FULL_RIGHT: - new_value = value + view_size + padding; + new_value = value + (1.0 - scroll_full_overlap) * view_size + padding; break; case HALF_UP: case HALF_LEFT: