Commit ed27f8b8 authored by Marwan Tanager's avatar Marwan Tanager Committed by Sebastian Ramacher
Browse files

Minor cleanup



Since we 'continue' the loop if num_search_results is 0, there is no need for
the second check.
Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent cba5d8df
......@@ -965,13 +965,12 @@ sc_search(girara_session_t* session, girara_argument_t* argument,
GtkWidget* page_widget = zathura_page_get_widget(zathura, page);
int num_search_results = 0, current = -1;
g_object_get(page_widget, "search-current", &current,
"search-length", &num_search_results, NULL);
g_object_get(page_widget, "search-current", &current, "search-length", &num_search_results, NULL);
if (num_search_results == 0 || current == -1) {
continue;
}
if ((first_time_after_abort == true && num_search_results > 0) || ((tmp + num_pages) % num_pages != cur_page)) {
if (first_time_after_abort == true || (tmp + num_pages) % num_pages != cur_page) {
target_page = page;
target_idx = diff == 1 ? 0 : num_search_results - 1;
break;
......
Supports Markdown
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