mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 23:03:48 +01:00
Fix sc_goto
This commit is contained in:
parent
09d2ee0926
commit
908e06de16
13
shortcuts.c
13
shortcuts.c
@ -114,19 +114,14 @@ sc_goto(girara_session_t* session, girara_argument_t* argument, unsigned int t)
|
|||||||
g_return_val_if_fail(zathura->document != NULL, false);
|
g_return_val_if_fail(zathura->document != NULL, false);
|
||||||
|
|
||||||
if (argument->n == TOP) {
|
if (argument->n == TOP) {
|
||||||
girara_argument_t arg = { TOP, NULL };
|
page_set(zathura, 0);
|
||||||
sc_scroll(session, &arg, 0);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
} else {
|
} else {
|
||||||
if (t == 0) {
|
if (t == 0) {
|
||||||
girara_argument_t arg = { BOTTOM, NULL };
|
page_set(zathura, zathura->document->number_of_pages - 1);
|
||||||
sc_scroll(session, &arg, 0);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
page_set(zathura, t - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
page_set(zathura, t - 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user