summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--riscos/url_complete.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/riscos/url_complete.c b/riscos/url_complete.c
index 33151f3f9..6c63a3312 100644
--- a/riscos/url_complete.c
+++ b/riscos/url_complete.c
@@ -180,7 +180,6 @@ bool ro_gui_url_complete_keypress(struct gui_window *g, int key) {
}
url_complete_matches[url_complete_matches_available - 1] =
output;
-
}
/* update the window */
@@ -200,7 +199,7 @@ bool ro_gui_url_complete_keypress(struct gui_window *g, int key) {
lines = MAXIMUM_VISIBLE_LINES;
if (lines > url_complete_matches_available)
lines = url_complete_matches_available;
- for (i = 0; i < MAXIMUM_VISIBLE_LINES; i++) {
+ for (i = 0; i < lines; i++) {
if (url_complete_redraw[i] != url_complete_matches[i]) {
error = xwimp_force_redraw(dialog_url_complete,
0, -(i + 1) * 44, 65536, -i * 44);
@@ -326,6 +325,7 @@ void ro_gui_url_complete_resize(struct gui_window *g, wimp_open *open) {
* or there is no URL bar shown, or there are no URL matches, close it */
if ((open->w != url_complete_parent) || (!g->toolbar) ||
(!g->toolbar->display_url) ||
+ (!url_complete_matches) ||
(url_complete_matches_available == 0)) {
ro_gui_url_complete_close(NULL, 0);
return;