diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2006-07-13 21:28:07 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2006-07-13 21:28:07 +0000 |
commit | 652f594cbba02b7f64edb3a02499344c3ece295f (patch) | |
tree | 946fa580a816496902832a47355ad6dd5a572031 /riscos/url_complete.c | |
parent | 1fcceb72f680eb9963b519c4b27f89a0977247d5 (diff) | |
download | netsurf-652f594cbba02b7f64edb3a02499344c3ece295f.tar.gz netsurf-652f594cbba02b7f64edb3a02499344c3ece295f.tar.bz2 |
Further url completion fixes
svn path=/trunk/netsurf/; revision=2744
Diffstat (limited to 'riscos/url_complete.c')
-rw-r--r-- | riscos/url_complete.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/riscos/url_complete.c b/riscos/url_complete.c index cd7e932f5..e23d8cdbf 100644 --- a/riscos/url_complete.c +++ b/riscos/url_complete.c @@ -86,7 +86,6 @@ bool ro_gui_url_complete_keypress(struct gui_window *g, int key) char *url; int i, lines; int old_selection; - bool ignore_changes = false; int height; os_error *error; bool currently_open; @@ -126,15 +125,9 @@ bool ro_gui_url_complete_keypress(struct gui_window *g, int key) return false; } - /* check if we should ignore text changes */ - if ((url_complete_keypress_selection >= 0) && (url_complete_matches)) - ignore_changes = !strcmp(url, - url_complete_matches[ - url_complete_keypress_selection]); - /* if the text to match has changed then update it */ - if (!ignore_changes && ((!url_complete_matched_string) || - (strcmp(match_url, url_complete_matched_string)))) { + if ((!url_complete_matched_string) || + (strcmp(match_url, url_complete_matched_string))) { /* memorize the current matches */ lines = MAXIMUM_VISIBLE_LINES; @@ -181,7 +174,8 @@ bool ro_gui_url_complete_keypress(struct gui_window *g, int key) urldb_iterate_entries(url_complete_callback); else urldb_iterate_partial(match_url, url_complete_callback); - if (url_complete_memory_exhausted) { + if ((url_complete_memory_exhausted) || + (url_complete_matches_available == 0)) { ro_gui_url_complete_close(NULL, 0); return false; } @@ -295,6 +289,9 @@ bool ro_gui_url_complete_keypress(struct gui_window *g, int key) ICON_TOOLBAR_URL, url_complete_matches[ url_complete_matches_selection]); + free(url_complete_matched_string); + url_complete_matched_string = strdup(url_complete_matches[ + url_complete_matches_selection]); } url_complete_keypress_selection = url_complete_matches_selection; |