diff options
| author | Stephen Blott | 2015-06-10 19:21:41 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-06-10 19:21:41 +0100 | 
| commit | 30cfcbdcfaecf03de67561ae88574fac837f75e3 (patch) | |
| tree | bb6f233476b8fc391ecb1cc435047c06efacb562 | |
| parent | 91bbb3122b58e834cc5512768eb09046fac2b448 (diff) | |
| download | vimium-30cfcbdcfaecf03de67561ae88574fac837f75e3.tar.bz2 | |
Do not try to move a tab to the left of pinned tabs.
| -rw-r--r-- | background_scripts/main.coffee | 5 | 
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 | 
