From dd3df79ea999850c737b049081d81afa59af22d3 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Tue, 18 Nov 2014 12:53:40 +0100 Subject: [PATCH] [libview] 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 --- libview/ev-view.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libview/ev-view.c b/libview/ev-view.c index f3aa033..a9159cd 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -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); -- 2.1.0