aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--background_scripts/main.coffee3
1 files changed, 1 insertions, 2 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index d4ba7850..a13d9d98 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -360,8 +360,7 @@ selectTab = (direction, count = 1) ->
when "last"
tabs.length - 1
# Bring toSelect into the range [0,tabs.length).
- toSelect += tabs.length while toSelect < 0
- toSelect %= tabs.length
+ toSelect = (toSelect + tabs.length * Math.abs count) % tabs.length
chrome.tabs.update tabs[toSelect].id, selected: true
updateOpenTabs = (tab, deleteFrames = false) ->