add continuous history save

This commit is contained in:
Deven Lahoti 2017-05-21 15:57:58 -05:00
parent 080597c079
commit 4be0983080
3 changed files with 16 additions and 0 deletions

View file

@ -652,6 +652,14 @@ Defines if the number of pages per row should be honored when advancing a page.
* Value type: Boolean
* Default value: false
continuous-hist-save
^^^^^^^^^^^^^^^^^^^^
Tells zathura whether to save document history at each page change or only when
closing a document.
* Value type: Boolean
* Default value: false
database
^^^^^^^^
Defines the database backend to use for bookmarks and input history. Possible

View file

@ -242,6 +242,8 @@ config_load_default(zathura_t* zathura)
girara_setting_add(gsession, "synctex-editor-command", string_value, STRING, false, _("Synctex editor command"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "dbus-service", &bool_value, BOOLEAN, false, _("Enable D-Bus service"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "continuous-hist-save", &bool_value, BOOLEAN, false, _("Save history at each page change"), NULL, NULL);
string_value = "primary";
girara_setting_add(gsession, "selection-clipboard", string_value, STRING, false, _("The clipboard into which mouse-selected data will be written"), NULL, NULL);
bool_value = true;

View file

@ -1281,6 +1281,12 @@ page_set(zathura_t* zathura, unsigned int page_id)
zathura_document_set_current_page_number(zathura->document, page_id);
bool continuous_hist_save = false;
girara_setting_get(zathura->ui.session, "continuous-hist-save", &continuous_hist_save);
if (continuous_hist_save) {
save_fileinfo_to_db(zathura);
}
/* negative position means auto */
return position_set(zathura, -1, -1);