Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Sebastian Ramacher 2017-06-13 19:48:28 +02:00
parent 801a28cdf4
commit a3115e2c92

View file

@ -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;