aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/completion.coffee
diff options
context:
space:
mode:
authorStephen Blott2015-05-06 04:55:22 +0100
committerStephen Blott2015-05-06 05:03:13 +0100
commit7d11b1699454366bf99e8e5033ba39b127687fcb (patch)
tree740e1234c6d5ce89058d1841bf22971098c38eee /background_scripts/completion.coffee
parent3a4ca1615ec714e9036453bd44839fe056be63e7 (diff)
downloadvimium-7d11b1699454366bf99e8e5033ba39b127687fcb.tar.bz2
Search completion; simplify messaging code.
This eliminates the need to repeatedly install and remove listeners for @filterPort in the vomnibar. It also eleiminates the need for "keepAlive" in reponses. All as suggested by @mrmr1993 in #1635.
Diffstat (limited to 'background_scripts/completion.coffee')
-rw-r--r--background_scripts/completion.coffee4
1 files changed, 2 insertions, 2 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee
index 729e86ab..c91825b5 100644
--- a/background_scripts/completion.coffee
+++ b/background_scripts/completion.coffee
@@ -478,12 +478,12 @@ class MultiCompleter
# (ie. a SearchEngineCompleter). This prevents hiding the vomnibar briefly before showing it
# again, which looks ugly.
unless shouldRunContinuation and suggestions.length == 0
- onComplete @prepareSuggestions(queryTerms, suggestions), keepAlive: shouldRunContinuation
+ onComplete @prepareSuggestions queryTerms, suggestions
# Allow subsequent queries to begin.
@filterInProgress = false
if shouldRunContinuation
continuation suggestions, (newSuggestions) =>
- onComplete @prepareSuggestions queryTerms, suggestions.concat(newSuggestions)
+ onComplete @prepareSuggestions queryTerms, suggestions.concat newSuggestions
else
@filter @mostRecentQuery.queryTerms, @mostRecentQuery.onComplete if @mostRecentQuery