Skip to content

Commit

Permalink
Provide additional debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinas committed Jun 23, 2024
1 parent 2873dbb commit a4ef953
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions zathura/zathura.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,11 +1172,13 @@ bool document_open(zathura_t* zathura, const char* path, const char* uri, const

/* jumplist */
if (zathura_jumplist_load(zathura, file_path) == false) {
girara_debug("Failed to load jumplist.");
zathura->jumplist.list = girara_list_new2(g_free);
}

/* quickmarks */
if (zathura_quickmarks_load(zathura, file_path) == false) {
girara_debug("Failed to load quickmarks.");
zathura->global.marks = girara_list_new2(g_free);
}
} else {
Expand Down Expand Up @@ -1215,11 +1217,13 @@ bool document_open(zathura_t* zathura, const char* path, const char* uri, const
}

/* Set page */
page_set(zathura, zathura_document_get_current_page_number(document));
const unsigned int page = zathura_document_get_current_page_number(document);
girara_debug("Setting page: %u", page);
page_set(zathura, page);

/* Set position (only if restoring from history file) */
if (file_info.current_page == zathura_document_get_current_page_number(document) &&
(file_info.position_x != 0 || file_info.position_y != 0)) {
if (file_info.current_page == page && (file_info.position_x != 0 || file_info.position_y != 0)) {
girara_debug("Setting position.");
position_set(zathura, file_info.position_x, file_info.position_y);
}

Expand Down

0 comments on commit a4ef953

Please sign in to comment.