From b5fcb4d94cc6f93cd6ee7a7bfb850c9593e00e26 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Wed, 25 Jan 2006 17:28:29 +0000 Subject: [project @ 2006-01-25 17:28:29 by rjw] Implement feature request 1365051. svn path=/import/netsurf/; revision=2043 --- riscos/search.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'riscos/search.c') diff --git a/riscos/search.c b/riscos/search.c index a160c028e..41b136ca4 100644 --- a/riscos/search.c +++ b/riscos/search.c @@ -358,7 +358,7 @@ void do_search(char *string, int string_len, bool case_sens, bool forwards) struct content *c; struct box *box; struct list_entry *a, *b; - int x,y; + int x0,y0,x1,y1; bool new = false; if (!search_current_window) @@ -450,9 +450,13 @@ void do_search(char *string, int string_len, bool case_sens, bool forwards) search_current->end_idx); /* get box position and jump to it */ - box_coords(search_current->start_box, &x, &y); -// LOG(("%p (%d, %d)", search_current, x, y)); - gui_window_set_scroll(search_current_window, x, y); + box_coords(search_current->start_box, &x0, &y0); + x0 += 0; /* \todo: move x0 in by correct idx */ + box_coords(search_current->end_box, &x1, &y1); + x1 += search_current->end_box->width; /* \todo: move x1 in by correct idx */ + y1 += search_current->end_box->height; + + gui_window_scroll_visible(search_current_window, x0, y0, x1, y1); } -- cgit v1.2.3