diff options
| author | Stephen Blott | 2014-12-30 16:57:27 +0000 |
|---|---|---|
| committer | Stephen Blott | 2014-12-30 16:57:27 +0000 |
| commit | 094753c5a536ebacdaa3f811d198595ef2c67d24 (patch) | |
| tree | 1c30e80646330bd8a097c991486a5968298dc885 /background_scripts/completion.coffee | |
| parent | 214ecb92caa8fc5a71dd3cac70a7280e1de08ccd (diff) | |
| download | vimium-094753c5a536ebacdaa3f811d198595ef2c67d24.tar.bz2 | |
Delay recognising query as search-engine query.
Diffstat (limited to 'background_scripts/completion.coffee')
| -rw-r--r-- | background_scripts/completion.coffee | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 4e570313..5cab54ed 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) -> + if 1 < queryTerms.length and engine = @searchEngines[queryTerms[0]] then engine else {} # 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. |
