aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/completion.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'background_scripts/completion.coffee')
-rw-r--r--background_scripts/completion.coffee3
1 files changed, 3 insertions, 0 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee
index d6402019..177892fb 100644
--- a/background_scripts/completion.coffee
+++ b/background_scripts/completion.coffee
@@ -21,6 +21,8 @@ class Suggestion
# - extraRelevancyData: data (like the History item itself) which may be used by the relevancy function.
constructor: (@queryTerms, @type, @url, @title, @computeRelevancyFunction, @extraRelevancyData) ->
@title ||= ""
+ # When @autoSelect is truthy, the suggestion is automatically pre-selected in the vomnibar.
+ @autoSelect = false
computeRelevancy: -> @relevancy = @computeRelevancyFunction(this)
@@ -335,6 +337,7 @@ class SearchEngineCompleter
type = "search"
query = queryTerms[0] + ": " + queryTerms[1..].join(" ")
suggestion = new Suggestion(queryTerms, type, url, query, @computeRelevancy)
+ suggestion.autoSelect = true
suggestions.push(suggestion)
onComplete(suggestions)