aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'background_scripts')
-rw-r--r--background_scripts/main.coffee5
1 files changed, 4 insertions, 1 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 6e1226b6..272c3aa6 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -239,9 +239,12 @@ repeatFunction = (func, totalCount, currentCount, frameId) ->
moveTab = (count) ->
chrome.tabs.getAllInWindow null, (tabs) ->
+ pinnedCount = 0
+ for tab in tabs
+ pinnedCount += 1 if tab.pinned
chrome.tabs.getSelected null, (tab) ->
chrome.tabs.move tab.id,
- index: Math.max 0, Math.min tabs.length - 1, tab.index + count
+ index: Math.max pinnedCount, Math.min tabs.length - 1, tab.index + count
# Start action functions