aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/completion.coffee
diff options
context:
space:
mode:
authorStephen Blott2015-05-27 13:43:34 +0100
committerStephen Blott2015-05-27 13:43:34 +0100
commit764d70312f292882abe4940adf9fee3d6e834327 (patch)
treea0ab0b82d6c6c1e479b5af25b8556c7e6386540a /background_scripts/completion.coffee
parent1e236a21373f667f8fd1cec07df4b647b2b30e1c (diff)
downloadvimium-764d70312f292882abe4940adf9fee3d6e834327.tar.bz2
Do not de-duplicate tabs vomnibar entries.
Diffstat (limited to 'background_scripts/completion.coffee')
-rw-r--r--background_scripts/completion.coffee5
1 files changed, 4 insertions, 1 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee
index 30a7b882..ff27e518 100644
--- a/background_scripts/completion.coffee
+++ b/background_scripts/completion.coffee
@@ -29,6 +29,8 @@ class Suggestion
@highlightTerms = true
# @insertText is text to insert into the vomnibar input when the suggestion is selected.
@insertText = null
+ # @deDuplicate controls whether this suggestion is a candidate for deduplication.
+ @deDuplication = true
# Other options set by individual completers include:
# - tabId (TabCompleter)
@@ -390,6 +392,7 @@ class TabCompleter
title: tab.title
relevancyFunction: @computeRelevancy
tabId: tab.id
+ deDuplicate: false
onComplete suggestions
computeRelevancy: (suggestion) ->
@@ -665,7 +668,7 @@ class MultiCompleter
suggestions =
for suggestion in suggestions
url = suggestion.shortenUrl()
- continue if seenUrls[url]
+ continue if suggestion.deDuplicate and seenUrls[url]
break if count++ == @maxResults
seenUrls[url] = suggestion