mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 09:16:00 +01:00
Fix sc_goto
This commit is contained in:
parent
09d2ee0926
commit
908e06de16
1 changed files with 4 additions and 9 deletions
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);
|
||||
|
||||
if (argument->n == TOP) {
|
||||
girara_argument_t arg = { TOP, NULL };
|
||||
sc_scroll(session, &arg, 0);
|
||||
|
||||
return false;
|
||||
page_set(zathura, 0);
|
||||
} else {
|
||||
if (t == 0) {
|
||||
girara_argument_t arg = { BOTTOM, NULL };
|
||||
sc_scroll(session, &arg, 0);
|
||||
|
||||
page_set(zathura, zathura->document->number_of_pages - 1);
|
||||
return true;
|
||||
} else {
|
||||
page_set(zathura, t - 1);
|
||||
}
|
||||
|
||||
page_set(zathura, t - 1);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue