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