From cc226c02930d6af81352237e258024b69cc873e5 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 15 Jun 2006 15:47:34 +0000 Subject: Make URL completion ignore unvisited URLs svn path=/trunk/netsurf/; revision=2621 --- riscos/url_complete.c | 10 ++++++++-- 1 file 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 > -- cgit v1.2.3