mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 10:46:01 +01:00
save file info on close
This commit is contained in:
parent
88c4dd6bbe
commit
d047a36f6c
1 changed files with 5 additions and 0 deletions
|
@ -345,6 +345,7 @@ document_open(zathura_t* zathura, const char* path, const char* password)
|
|||
float scale = 1.0f;
|
||||
if (zathura_db_get_fileinfo(zathura->database, zathura->document->file_path, &page, &offset, &scale)) {
|
||||
page_set_delayed(zathura, page);
|
||||
zathura->document->scale = scale;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -396,6 +397,10 @@ document_close(zathura_t* zathura)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* store last seen page */
|
||||
zathura_db_set_fileinfo(zathura->database, zathura->document->file_path, zathura->document->current_page_number,
|
||||
/* zathura->document->offset TODO */ 0, zathura->document->scale);
|
||||
|
||||
render_free(zathura->sync.render_thread);
|
||||
zathura->sync.render_thread = NULL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue