From 31807f8c44c6d032cf9ba5ce0f8507c4e716da8c Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 18 May 2015 15:34:25 +0100 Subject: Fully fix 3646b8c999a9e4b864e8c529f84b64a3c2c74ff0. --- background_scripts/completion.coffee | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 1ed92034..21214a0f 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -510,21 +510,19 @@ class SearchEngineCompleter highlightTerms: not haveCompletionEngine isSearchSuggestion: true - mkSuggestion = do => - count = 0 - (suggestion) => - url = Utils.createSearchUrl suggestion, searchUrl - @previousSuggestions[url] = new Suggestion - queryTerms: queryTerms - type: description - url: url - title: suggestion - insertText: suggestion - highlightTerms: false - highlightTermsExcludeUrl: true - isCustomSearch: custom - relevancyFunction: @computeRelevancy - relevancyData: factor + mkSuggestion = (suggestion) => + url = Utils.createSearchUrl suggestion, searchUrl + @previousSuggestions[url] = new Suggestion + queryTerms: queryTerms + type: description + url: url + title: suggestion + insertText: suggestion + highlightTerms: false + highlightTermsExcludeUrl: true + isCustomSearch: custom + relevancyFunction: @computeRelevancy + relevancyData: factor cachedSuggestions = if haveCompletionEngine then CompletionSearch.complete searchUrl, queryTerms else null -- cgit v1.2.3