aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2014-12-31 09:02:38 +0000
committerStephen Blott2014-12-31 09:02:38 +0000
commit4ce1528601e70d4de0b505ebef5db8f7d3b71277 (patch)
tree59d978957f3033fdea949230527514ddd7508862
parent214ecb92caa8fc5a71dd3cac70a7280e1de08ccd (diff)
parent877bf98618ba4f8c2dfdb6a82459a98816062112 (diff)
downloadvimium-4ce1528601e70d4de0b505ebef5db8f7d3b71277.tar.bz2
Merge branch 'search-engine-activate-after-space' into post-1.46
-rw-r--r--background_scripts/completion.coffee6
1 files changed, 3 insertions, 3 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee
index 4e570313..d6402019 100644
--- a/background_scripts/completion.coffee
+++ b/background_scripts/completion.coffee
@@ -324,7 +324,7 @@ class SearchEngineCompleter
searchEngines: {}
filter: (queryTerms, onComplete) ->
- {url: url, description: description} = this.getSearchEngineMatches(queryTerms[0])
+ {url: url, description: description} = @getSearchEngineMatches queryTerms
suggestions = []
if url
url = url.replace(/%s/g, Utils.createSearchQuery queryTerms[1..])
@@ -343,8 +343,8 @@ class SearchEngineCompleter
refresh: ->
this.searchEngines = root.Settings.getSearchEngines()
- getSearchEngineMatches: (queryTerm) ->
- this.searchEngines[queryTerm] || {}
+ getSearchEngineMatches: (queryTerms) ->
+ (1 < queryTerms.length and @searchEngines[queryTerms[0]]) or {}
# A completer which calls filter() on many completers, aggregates the results, ranks them, and returns the top
# 10. Queries from the vomnibar frontend script come through a multi completer.