aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/background/tabs.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/background/tabs.js b/src/background/tabs.js
index 32f71ba..166af4d 100644
--- a/src/background/tabs.js
+++ b/src/background/tabs.js
@@ -62,7 +62,7 @@ const selectPrevTab = (current, count) => {
if (tabs.length < 2) {
return;
}
- let select = (current - count) % tabs.length;
+ let select = (current - count + tabs.length) % tabs.length;
let id = tabs[select].id;
return browser.tabs.update(id, { active: true });
});
@@ -73,7 +73,7 @@ const selectNextTab = (current, count) => {
if (tabs.length < 2) {
return;
}
- let select = (current + count + tabs.length) % tabs.length;
+ let select = (current + count) % tabs.length;
let id = tabs[select].id;
return browser.tabs.update(id, { active: true });
});