diff options
| author | Stephen Blott | 2015-05-27 16:22:40 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-05-27 16:22:40 +0100 |
| commit | 4d0f08f72cd05a0ac47bd7aad9ee51c4fa52d97f (patch) | |
| tree | b516484e8c79efc2c4ac8ce5a61601ffb91e9510 | |
| parent | 594abdc59db60e942e03086b4a66d7c4e1e5ab66 (diff) | |
| parent | 402004f3567042a9fa940c3fd66ece1f60c10f88 (diff) | |
| download | vimium-4d0f08f72cd05a0ac47bd7aad9ee51c4fa52d97f.tar.bz2 | |
Merge pull request #1690 from smblott-github/do-not-deduplicate-tabs
Two errors fixed...
| -rw-r--r-- | background_scripts/completion.coffee | 5 | ||||
| -rw-r--r-- | pages/vomnibar.coffee | 9 |
2 files changed, 10 insertions, 4 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 diff --git a/pages/vomnibar.coffee b/pages/vomnibar.coffee index fd7fd3cc..423ffa59 100644 --- a/pages/vomnibar.coffee +++ b/pages/vomnibar.coffee @@ -126,9 +126,12 @@ class VomnibarUI if (action == "dismiss") @hide() else if action in [ "tab", "down" ] - if @input.value.trim().length == 0 and action == "tab" and not @seenTabToOpenCompletionList - @seenTabToOpenCompletionList = true - @update true + if action == "tab" and + @completer.name == "omni" and + not @seenTabToOpenCompletionList and + @input.value.trim().length == 0 + @seenTabToOpenCompletionList = true + @update true else @selection += 1 @selection = @initialSelectionValue if @selection == @completions.length |
