aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2015-05-10 20:15:39 +0100
committerStephen Blott2015-05-10 20:17:01 +0100
commit21895866c43c09caff096ba2ef5503ee220bab73 (patch)
treef2a456be7277a9a6fe9b63026d90fab6d452d8f2
parentb733790d6b1b0f4110f3910e317e0be32b962fa4 (diff)
downloadvimium-21895866c43c09caff096ba2ef5503ee220bab73.tar.bz2
Search completion; minor changes to comments.
-rw-r--r--background_scripts/completion.coffee8
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