diff options
| author | Stephen Blott | 2015-05-04 10:27:08 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-05-04 10:27:09 +0100 |
| commit | b2ae01c8604ed87f52afa3b5e769fb340dcb1b93 (patch) | |
| tree | 4bcb8ffac5cac33b37d4f720e320396315428340 | |
| parent | 9de495ededee7f98504d6fe308ea73526956a7f3 (diff) | |
| download | vimium-b2ae01c8604ed87f52afa3b5e769fb340dcb1b93.tar.bz2 | |
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.
| -rw-r--r-- | background_scripts/completion.coffee | 3 |
1 files changed, 3 insertions, 0 deletions
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. |
