Fix sc_goto

This commit is contained in:
Moritz Lipp 2011-10-13 12:15:21 +02:00
parent 09d2ee0926
commit 908e06de16

View file

@ -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;