From b2ae01c8604ed87f52afa3b5e769fb340dcb1b93 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 4 May 2015 10:27:08 +0100 Subject: Search completion; force the first match to the top of the list. This may or may not be a good idea. It means that the first completion is just a tab away. --- background_scripts/completion.coffee | 3 +++ 1 file changed, 3 insertions(+) (limited to 'background_scripts') diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index a75cf6b5..795b4658 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -385,6 +385,9 @@ class SearchEngineCompleter suggestions.push @mkSuggestion true, queryTerms, type, mkUrl(suggestion), suggestion, @computeRelevancy, score score *= 0.9 + # Experimental. Force the best match to the top of the list. + suggestions[0].extraRelevancyData = 0.9999999 if 0 < suggestions.length + if custom # For custom search engines, we need to tell the front end to insert the search engine's keyword # when copying a suggestion into the vomnibar. -- cgit v1.2.3