aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/main.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/main.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/main.coffee')
-rw-r--r--background_scripts/main.coffee4
1 files changed, 2 insertions, 2 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 44644769..09a6b89f 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -226,8 +226,8 @@ filterCompleter = (args, port) ->
if args.id? and args.name? and args.query?
queryTerms = if (args.query == "") then [] else args.query.split(whitespaceRegexp)
- completers[args.name].filter queryTerms, (results, extra = {}) ->
- port.postMessage extend extra, id: args.id, results: results
+ completers[args.name].filter queryTerms, (results) ->
+ port.postMessage id: args.id, results: results
chrome.tabs.onSelectionChanged.addListener (tabId, selectionInfo) ->
if (selectionChangedHandlers.length > 0)