diff options
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/completion.coffee | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 3ddb21d2..d0058538 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -360,6 +360,7 @@ class SearchEngineCompleter cancel: -> CompletionSearch.cancel() + # Look up the search engine and, if one is found, then note it and remove its keyword from the query terms. triageRequest: (request) -> @searchEngines.use (engines) => { queryTerms, query } = request @@ -501,9 +502,10 @@ class MultiCompleter return @mostRecentQuery = arguments if @filterInProgress # Provide each completer with an opportunity to see (and possibly alter) the request before it is - # launched. - for completer in @completers - completer.triageRequest? request + # launched. This is primarily for SearchEngineCompleter, which notes a search query and removes any + # keyword from the queryTerms. Then, other completers don't include keywords in their matching and + # relevancy scores. + completer.triageRequest? request for completer in @completers RegexpCache.clear() { queryTerms } = request |
