From 7c855af38cfdf32a05b90b2da4711720ebac8865 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 5 May 2015 14:47:02 +0100 Subject: Search completion; user is typing. Add plumbing to allow the front end to directly inform completers when the user is typing. --- background_scripts/completion.coffee | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'background_scripts/completion.coffee') diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 33d8a563..92936098 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -331,6 +331,9 @@ class TabCompleter class SearchEngineCompleter searchEngines: {} + userIsTyping: -> + SearchEngines.userIsTyping() + filter: (queryTerms, onComplete) -> { keyword: keyword, url: url, description: description } = @getSearchEngineMatches queryTerms custom = url? @@ -443,6 +446,9 @@ class MultiCompleter refresh: -> completer.refresh?() for completer in @completers + userIsTyping: -> + completer.userIsTyping?() for completer in @completers + filter: (queryTerms, onComplete) -> # Allow only one query to run at a time. if @filterInProgress -- cgit v1.2.3