mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 23:13:48 +01:00
Make page mode toggling predictable
Previously, toggling page mode would jump to near page, but usually not the one your were looking at before.
This commit is contained in:
parent
6aa5420f37
commit
2371550807
@ -1224,6 +1224,8 @@ sc_toggle_page_mode(girara_session_t* session, girara_argument_t*
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned int page_id = zathura_document_get_current_page_number(zathura->document);
|
||||
|
||||
int pages_per_row = 1;
|
||||
girara_setting_get(zathura->ui.session, "pages-per-row", &pages_per_row);
|
||||
|
||||
@ -1237,6 +1239,10 @@ sc_toggle_page_mode(girara_session_t* session, girara_argument_t*
|
||||
girara_setting_set(zathura->ui.session, "pages-per-row", &value);
|
||||
adjust_view(zathura);
|
||||
|
||||
page_set(zathura, page_id);
|
||||
render_all(zathura);
|
||||
refresh_view(zathura);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user