summaryrefslogtreecommitdiff
path: root/riscos/search.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2006-01-25 17:28:29 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2006-01-25 17:28:29 +0000
commitb5fcb4d94cc6f93cd6ee7a7bfb850c9593e00e26 (patch)
tree6f650322f49c6e599dc1786252f8919b48ee33e1 /riscos/search.c
parent9af422099297fe058809f00d389f91a8e71ca1c8 (diff)
downloadnetsurf-b5fcb4d94cc6f93cd6ee7a7bfb850c9593e00e26.tar.gz
netsurf-b5fcb4d94cc6f93cd6ee7a7bfb850c9593e00e26.tar.bz2
[project @ 2006-01-25 17:28:29 by rjw]
Implement feature request 1365051. svn path=/import/netsurf/; revision=2043
Diffstat (limited to 'riscos/search.c')
-rw-r--r--riscos/search.c12
1 files changed, 8 insertions, 4 deletions
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);
}