diff --git a/config.def.h b/config.def.h index e18e409..ee5e2e9 100644 --- a/config.def.h +++ b/config.def.h @@ -66,7 +66,7 @@ char* uri_command = "firefox %s"; /* uri */ /* additional settings */ gboolean show_scrollbars = FALSE; -gboolean scroll_wrap = FALSE; +gboolean scroll_wrap = TRUE; int adjust_open = ADJUST_BESTFIT; #define SELECTION_STYLE POPPLER_SELECTION_GLYPH #define GOTO_MODE GOTO_LABELS /* GOTO_DEFAULT, GOTO_LABELS, GOTO_OFFSET */ diff --git a/zathura.c b/zathura.c index 2369a5d..99d4181 100644 --- a/zathura.c +++ b/zathura.c @@ -2092,11 +2092,11 @@ sc_navigate(Argument* argument) int new_page = Zathura.PDF.page_number; if(argument->n == NEXT) - new_page = scroll_wrap ? (new_page + 1) : ((new_page + 1) % number_of_pages); + new_page = scroll_wrap ? ((new_page + 1) % number_of_pages) : (new_page + 1); else if(argument->n == PREVIOUS) - new_page = scroll_wrap ? (new_page - 1) : ((new_page + number_of_pages - 1) % number_of_pages); + new_page = scroll_wrap ? ((new_page + number_of_pages - 1) % number_of_pages) : (new_page - 1); - if (scroll_wrap && (new_page < 0 || new_page >= number_of_pages)) + if (!scroll_wrap && (new_page < 0 || new_page >= number_of_pages)) return; set_page(new_page);