Commit a3115e2c authored by Sebastian Ramacher's avatar Sebastian Ramacher

Clean up

Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent 801a28cd
...@@ -856,15 +856,13 @@ sc_search(girara_session_t* session, girara_argument_t* argument, ...@@ -856,15 +856,13 @@ sc_search(girara_session_t* session, girara_argument_t* argument,
const unsigned int num_pages = zathura_document_get_number_of_pages(zathura->document); const unsigned int num_pages = zathura_document_get_number_of_pages(zathura->document);
const unsigned int cur_page = zathura_document_get_current_page_number(zathura->document); const unsigned int cur_page = zathura_document_get_current_page_number(zathura->document);
GtkWidget *cur_page_widget = zathura_page_get_widget(zathura, zathura_document_get_page(zathura->document, cur_page)); GtkWidget* cur_page_widget = zathura_page_get_widget(zathura, zathura_document_get_page(zathura->document, cur_page));
bool nohlsearch, first_time_after_abort; bool nohlsearch = false;
gboolean draw; bool first_time_after_abort = false;
nohlsearch = first_time_after_abort = false;
draw = FALSE;
girara_setting_get(session, "nohlsearch", &nohlsearch); girara_setting_get(session, "nohlsearch", &nohlsearch);
if (nohlsearch == false) { if (nohlsearch == false) {
gboolean draw = FALSE;
g_object_get(G_OBJECT(cur_page_widget), "draw-search-results", &draw, NULL); g_object_get(G_OBJECT(cur_page_widget), "draw-search-results", &draw, NULL);
if (draw == false) { if (draw == false) {
...@@ -875,8 +873,9 @@ sc_search(girara_session_t* session, girara_argument_t* argument, ...@@ -875,8 +873,9 @@ sc_search(girara_session_t* session, girara_argument_t* argument,
} }
int diff = argument->n == FORWARD ? 1 : -1; int diff = argument->n == FORWARD ? 1 : -1;
if (zathura->global.search_direction == BACKWARD) if (zathura->global.search_direction == BACKWARD) {
diff = -diff; diff = -diff;
}
zathura_page_t* target_page = NULL; zathura_page_t* target_page = NULL;
int target_idx = 0; int target_idx = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment