mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-04 04:06:01 +01:00
CS
This commit is contained in:
parent
9c9d07a615
commit
0ce7730965
1 changed files with 21 additions and 22 deletions
31
shortcuts.c
31
shortcuts.c
|
@ -612,7 +612,7 @@ sc_scroll(girara_session_t* session, girara_argument_t* argument,
|
||||||
new_value = value;
|
new_value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scroll_page_aware) {
|
if (scroll_page_aware == true) {
|
||||||
int page_offset;
|
int page_offset;
|
||||||
double page_size;
|
double page_size;
|
||||||
|
|
||||||
|
@ -638,32 +638,31 @@ sc_scroll(girara_session_t* session, girara_argument_t* argument,
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((argument->n == FULL_DOWN) || (argument->n == HALF_DOWN) ||
|
if ((argument->n == FULL_DOWN) || (argument->n == HALF_DOWN) ||
|
||||||
(argument->n==FULL_RIGHT) || (argument->n==HALF_RIGHT) )
|
(argument->n == FULL_RIGHT) || (argument->n == HALF_RIGHT)) {
|
||||||
{
|
|
||||||
if ((page_offset > value) &&
|
if ((page_offset > value) &&
|
||||||
(page_offset < value + view_size) )
|
(page_offset < value + view_size)) {
|
||||||
new_value = page_offset;
|
new_value = page_offset;
|
||||||
else if ( (page_offset <= value) &&
|
} else if ((page_offset <= value) &&
|
||||||
(page_offset + page_size < value + view_size) )
|
(page_offset + page_size < value + view_size)) {
|
||||||
new_value = page_offset + page_size + 1;
|
new_value = page_offset + page_size + 1;
|
||||||
else if ( (page_offset <= value) &&
|
} else if ((page_offset <= value) &&
|
||||||
(page_offset + page_size < new_value + view_size) )
|
(page_offset + page_size < new_value + view_size)) {
|
||||||
new_value = page_offset + page_size - view_size + 1;
|
new_value = page_offset + page_size - view_size + 1;
|
||||||
}
|
}
|
||||||
else if ( (argument->n==FULL_UP) || (argument->n==HALF_UP) ||
|
} else if ((argument->n == FULL_UP) || (argument->n == HALF_UP) ||
|
||||||
(argument->n==FULL_LEFT) || (argument->n==HALF_LEFT) )
|
(argument->n == FULL_LEFT) || (argument->n == HALF_LEFT)) {
|
||||||
{
|
|
||||||
if ((page_offset + 1 >= value) &&
|
if ((page_offset + 1 >= value) &&
|
||||||
(page_offset < value + view_size) )
|
(page_offset < value + view_size)) {
|
||||||
new_value = page_offset - view_size;
|
new_value = page_offset - view_size;
|
||||||
else if ( (page_offset <= value) &&
|
} else if ((page_offset <= value) &&
|
||||||
(page_offset + page_size + 1 < value + view_size) )
|
(page_offset + page_size + 1 < value + view_size)) {
|
||||||
new_value = page_offset + page_size - view_size;
|
new_value = page_offset + page_size - view_size;
|
||||||
else if ( (page_offset <= value) &&
|
} else if ((page_offset <= value) &&
|
||||||
(page_offset > new_value) )
|
(page_offset > new_value)) {
|
||||||
new_value = page_offset;
|
new_value = page_offset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
set_adjustment(adjustment, new_value);
|
set_adjustment(adjustment, new_value);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue