mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-14 17:53:47 +01:00
Make 'set scroll_wrap' work as expected.
Thank's to wart_.
This commit is contained in:
parent
66b3bd32b3
commit
5ad6af63c3
@ -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 */
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user