aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/completion.coffee
diff options
context:
space:
mode:
authorStephen Blott2015-05-18 15:06:46 +0100
committerStephen Blott2015-05-18 15:06:46 +0100
commit3646b8c999a9e4b864e8c529f84b64a3c2c74ff0 (patch)
tree5526209aeed11c90acdbc4ad1525b206bdefb625 /background_scripts/completion.coffee
parent6b4dcfeac3abfb7743536115790a2d8cc52a64f5 (diff)
downloadvimium-3646b8c999a9e4b864e8c529f84b64a3c2c74ff0.tar.bz2
Revert "Search completion; promote the top completion."
This reverts commit 4309dcd3030687f3ed02b86bbdf7c485baaee4a5. This is a bad idea. It pushes the suggestion at the top of the list out of the way. Users aren't going to like that if it's the one they're looking for. Conflicts: background_scripts/completion.coffee
Diffstat (limited to 'background_scripts/completion.coffee')
-rw-r--r--background_scripts/completion.coffee9
1 files changed, 3 insertions, 6 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee
index 39ec66c5..3e7cfe06 100644
--- a/background_scripts/completion.coffee
+++ b/background_scripts/completion.coffee
@@ -289,7 +289,7 @@ class DomainCompleter
queryTerms: queryTerms
type: "domain"
url: domains[0]?[0] ? "" # This is the URL or an empty string, but not null.
- relevancy: 2
+ relevancy: 1
].filter (s) -> 0 < s.url.length
# Returns a list of domains of the form: [ [domain, relevancy], ... ]
@@ -499,7 +499,7 @@ class SearchEngineCompleter
type: description
url: Utils.createSearchUrl queryTerms, searchUrl
title: queryTerms.join " "
- relevancy: 2
+ relevancy: 1
autoSelect: custom
highlightTerms: not haveCompletionEngine
isSearchSuggestion: true
@@ -511,15 +511,12 @@ class SearchEngineCompleter
@previousSuggestions[url] = new Suggestion
queryTerms: queryTerms
type: description
- url: Utils.createSearchUrl suggestion, searchUrl
+ url: url
title: suggestion
insertText: suggestion
highlightTerms: false
highlightTermsExcludeUrl: true
isCustomSearch: custom
- # The first (top) suggestion gets a score of 1. This puts it two <Tab>s away if a domain completion
- # is present (which has a score of 2), and one <Tab> away otherwise.
- relevancy: if 0 < count++ then null else 1
relevancyFunction: @computeRelevancy
relevancyData: factor