[evince] Show correct page when next search result requested



commit d39c99cbb1c28a894b09f467b18e34754fd6842f
Author: Marek Kasik <mkasik redhat com>
Date:   Tue Nov 18 12:53:40 2014 +0100

    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 files changed, 4 insertions(+), 0 deletions(-)
---
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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]