mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 21:53:46 +01:00
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 <sebastian+dev@ramacher.at>
This commit is contained in:
parent
cba5d8df77
commit
ed27f8b88e
@ -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", ¤t,
|
||||
"search-length", &num_search_results, NULL);
|
||||
g_object_get(page_widget, "search-current", ¤t, "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;
|
||||
|
Loading…
Reference in New Issue
Block a user