diff options
| author | Stephen Blott | 2015-06-10 20:01:12 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-06-10 20:01:12 +0100 | 
| commit | abc24123a9bec8f07d019d31c08a8740e695401d (patch) | |
| tree | 9597c4bcb595e00799d36b9a7ef8ee7d25d2759e | |
| parent | 30cfcbdcfaecf03de67561ae88574fac837f75e3 (diff) | |
| download | vimium-abc24123a9bec8f07d019d31c08a8740e695401d.tar.bz2 | |
Refactor moveTab for clarity...
... as suggested by @mrmr1993 in #1728.
| -rw-r--r-- | background_scripts/main.coffee | 4 | 
1 files changed, 1 insertions, 3 deletions
| diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 272c3aa6..d4b14f3c 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -239,9 +239,7 @@ repeatFunction = (func, totalCount, currentCount, frameId) ->  moveTab = (count) ->    chrome.tabs.getAllInWindow null, (tabs) -> -    pinnedCount = 0 -    for tab in tabs -      pinnedCount += 1 if tab.pinned +    pinnedCount = (tabs.filter (tab) -> tab.pinned).length      chrome.tabs.getSelected null, (tab) ->        chrome.tabs.move tab.id,          index: Math.max pinnedCount, Math.min tabs.length - 1, tab.index + count | 
