diff options
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/main.coffee | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 6ff3fa60..4c1b11ce 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) |
