mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 21:53:46 +01:00
at least stay on the same page after the rotation
This commit is contained in:
parent
a51183cd66
commit
aebab3e73c
@ -320,6 +320,8 @@ sc_rotate(girara_session_t* session, girara_argument_t* UNUSED(argument),
|
||||
zathura_t* zathura = session->global.data;
|
||||
g_return_val_if_fail(zathura->document != NULL, false);
|
||||
|
||||
unsigned int page_number = zathura->document->current_page_number;
|
||||
|
||||
/* update rotate value */
|
||||
zathura->document->rotate = (zathura->document->rotate + 90) % 360;
|
||||
|
||||
@ -327,6 +329,8 @@ sc_rotate(girara_session_t* session, girara_argument_t* UNUSED(argument),
|
||||
/* XXX: we don't need to rerender, only to resize the widgets and redraw */
|
||||
render_all(zathura);
|
||||
|
||||
page_set_delayed(zathura, page_number);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user