aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
diff options
context:
space:
mode:
authorStephen Blott2015-06-10 19:21:41 +0100
committerStephen Blott2015-06-10 19:21:41 +0100
commit30cfcbdcfaecf03de67561ae88574fac837f75e3 (patch)
treebb6f233476b8fc391ecb1cc435047c06efacb562 /background_scripts
parent91bbb3122b58e834cc5512768eb09046fac2b448 (diff)
downloadvimium-30cfcbdcfaecf03de67561ae88574fac837f75e3.tar.bz2
Do not try to move a tab to the left of pinned tabs.
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