diff --git a/zathura/shortcuts.c b/zathura/shortcuts.c index 55e4e38..24b75d3 100644 --- a/zathura/shortcuts.c +++ b/zathura/shortcuts.c @@ -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 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)); - bool nohlsearch, first_time_after_abort; - gboolean draw; + GtkWidget* cur_page_widget = zathura_page_get_widget(zathura, zathura_document_get_page(zathura->document, cur_page)); + bool nohlsearch = false; + bool first_time_after_abort = false; - nohlsearch = first_time_after_abort = false; - draw = FALSE; girara_setting_get(session, "nohlsearch", &nohlsearch); - if (nohlsearch == false) { + gboolean draw = FALSE; g_object_get(G_OBJECT(cur_page_widget), "draw-search-results", &draw, NULL); if (draw == false) { @@ -875,8 +873,9 @@ sc_search(girara_session_t* session, girara_argument_t* argument, } int diff = argument->n == FORWARD ? 1 : -1; - if (zathura->global.search_direction == BACKWARD) + if (zathura->global.search_direction == BACKWARD) { diff = -diff; + } zathura_page_t* target_page = NULL; int target_idx = 0;