mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 12:15:59 +01:00
Reverse scroll-wrap's logic
When set to true, it used to _not_ wrap around the begining/end. Now it wraps if set to true, and it doesn't if set to false. Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
824843a917
commit
c06d353eb7
1 changed files with 3 additions and 3 deletions
|
@ -422,20 +422,20 @@ sc_navigate(girara_session_t* session, girara_argument_t* argument,
|
|||
|
||||
t = (t == 0) ? (unsigned int) offset : t;
|
||||
if (argument->n == NEXT) {
|
||||
if (scroll_wrap == true) {
|
||||
if (scroll_wrap == false) {
|
||||
new_page = new_page + t;
|
||||
} else {
|
||||
new_page = (new_page + t) % number_of_pages;
|
||||
}
|
||||
} else if (argument->n == PREVIOUS) {
|
||||
if (scroll_wrap == true) {
|
||||
if (scroll_wrap == false) {
|
||||
new_page = new_page - t;
|
||||
} else {
|
||||
new_page = (new_page + number_of_pages - t) % number_of_pages;
|
||||
}
|
||||
}
|
||||
|
||||
if (scroll_wrap == true && (new_page < 0 || new_page >= number_of_pages)) {
|
||||
if ((new_page < 0 || new_page >= number_of_pages) && !scroll_wrap) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue