aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/main.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'background_scripts/main.coffee')
-rw-r--r--background_scripts/main.coffee5
1 files changed, 3 insertions, 2 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 972f1529..a1311a46 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -337,8 +337,9 @@ BackgroundCommands =
visitPreviousTab: (count) ->
chrome.tabs.getSelected null, (tab) ->
- newTabId = BgUtils.tabRecency.getRecentTab tab.id, count
- chrome.tabs.update newTabId, selected: true
+ tabIds = BgUtils.tabRecency.getTabsByRecency().filter (tabId) -> tabId != tab.id
+ if 0 < tabIds.length
+ selectSpecificTab id: tabIds[(count-1) % tabIds.length]
# Remove tabs before, after, or either side of the currently active tab
removeTabsRelative = (direction) ->