Commit f2c908cf authored by Marek Kašík's avatar Marek Kašík

Show correct page when next search result requested

If there are more than 1 results on a page then requesting
next search result from the same page will not return you
to the page with the search results if you moved from the
page in the meantime (when you are not in continuous mode).
This applies also to previous results.

https://bugzilla.gnome.org/show_bug.cgi?id=730252
parent aa988afb
......@@ -8250,6 +8250,8 @@ ev_view_find_next (EvView *view)
if (view->find_result >= n_results) {
view->find_result = 0;
jump_to_find_page (view, EV_VIEW_FIND_NEXT, 1);
} else if (view->find_page != view->current_page) {
jump_to_find_page (view, EV_VIEW_FIND_NEXT, 0);
}
jump_to_find_result (view);
......@@ -8264,6 +8266,8 @@ ev_view_find_previous (EvView *view)
if (view->find_result < 0) {
jump_to_find_page (view, EV_VIEW_FIND_PREV, -1);
view->find_result = MAX (0, ev_view_find_get_n_results (view, view->find_page) - 1);
} else if (view->find_page != view->current_page) {
jump_to_find_page (view, EV_VIEW_FIND_PREV, 0);
}
jump_to_find_result (view);
......
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