diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2006-06-15 15:47:34 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2006-06-15 15:47:34 +0000 |
commit | cc226c02930d6af81352237e258024b69cc873e5 (patch) | |
tree | 8318b829b92c21814c6143aa51a08fd7741781b6 /riscos/url_complete.c | |
parent | 026ba672aee12b00ac1388bf5f01eacd02919d09 (diff) | |
download | netsurf-cc226c02930d6af81352237e258024b69cc873e5.tar.gz netsurf-cc226c02930d6af81352237e258024b69cc873e5.tar.bz2 |
Make URL completion ignore unvisited URLs
svn path=/trunk/netsurf/; revision=2621
Diffstat (limited to 'riscos/url_complete.c')
-rw-r--r-- | riscos/url_complete.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/riscos/url_complete.c b/riscos/url_complete.c index 47ebf906d..72a1e4071 100644 --- a/riscos/url_complete.c +++ b/riscos/url_complete.c @@ -46,7 +46,8 @@ static wimp_icon url_complete_sprite; static int mouse_x; static int mouse_y; -static bool url_complete_callback(const char *url); +static bool url_complete_callback(const char *url, + const struct url_data *data); /** * Should be called when the caret is placed into a URL completion icon. @@ -327,12 +328,17 @@ bool ro_gui_url_complete_keypress(struct gui_window *g, int key) * Callback function for urldb_iterate_partial * * \param url URL which matches + * \param data Data associated with URL * \return true to continue iteration, false otherwise */ -bool url_complete_callback(const char *url) +bool url_complete_callback(const char *url, const struct url_data *data) { const char **array_extend; + /* Ignore unvisited URLs */ + if (data->visits == 0) + return true; + url_complete_matches_available++; if (url_complete_matches_available > |