aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/main.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'background_scripts/main.coffee')
-rw-r--r--background_scripts/main.coffee3
1 files changed, 2 insertions, 1 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index e2bfeb6d..3d3a59a6 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -192,8 +192,9 @@ handleSettings = (args, port) ->
refreshCompleter = (request) -> completers[request.name].refresh()
+whitespaceRegexp = /\s+/
filterCompleter = (args, port) ->
- queryTerms = if (args.query == "") then [] else args.query.split(" ")
+ queryTerms = if (args.query == "") then [] else args.query.split(whitespaceRegexp)
completers[args.name].filter(queryTerms, (results) -> port.postMessage({ id: args.id, results: results }))
getCurrentTimeInSeconds = -> Math.floor((new Date()).getTime() / 1000)