diff --git a/shortcuts.c b/shortcuts.c index 4b58223..46e8f8e 100644 --- a/shortcuts.c +++ b/shortcuts.c @@ -444,7 +444,7 @@ sc_reload(girara_session_t* session, girara_argument_t* UNUSED(argument), bool sc_rotate(girara_session_t* session, girara_argument_t* argument, - girara_event_t* UNUSED(event), unsigned int UNUSED(t)) + girara_event_t* UNUSED(event), unsigned int t) { g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session->global.data != NULL, false); @@ -459,8 +459,9 @@ sc_rotate(girara_session_t* session, girara_argument_t* argument, } /* update rotate value */ + t = (t == 0) ? 1 : t; unsigned int rotation = zathura_document_get_rotation(zathura->document); - zathura_document_set_rotation(zathura->document, (rotation + angle) % 360); + zathura_document_set_rotation(zathura->document, (rotation + angle * t) % 360); /* update scale */ girara_argument_t new_argument = { zathura_document_get_adjust_mode(zathura->document), NULL };