aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/main.coffee
diff options
context:
space:
mode:
authorJez Ng2012-09-08 16:37:05 -0400
committerJez Ng2012-09-08 16:37:05 -0400
commitadf8b7cc617279e50594477560ec7031e2ab68ea (patch)
treef43660994fb29770bd38e4b11cc11d828ecc0615 /background_scripts/main.coffee
parent3e5bba24ede4f9392ff666634a0a8f05e21a02d1 (diff)
parente740ea52b646f1b7cd0ef13e15571b20adaa3bd8 (diff)
downloadvimium-adf8b7cc617279e50594477560ec7031e2ab68ea.tar.bz2
Merge branch 'next-release'
Diffstat (limited to 'background_scripts/main.coffee')
-rw-r--r--background_scripts/main.coffee26
1 files changed, 13 insertions, 13 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index bc3fde0b..a3857d61 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -265,17 +265,17 @@ selectTab = (callback, direction) ->
chrome.tabs.getAllInWindow(null, (tabs) ->
return unless tabs.length > 1
chrome.tabs.getSelected(null, (currentTab) ->
- switch direction
- when "next"
- toSelect = tabs[(currentTab.index + 1 + tabs.length) % tabs.length]
- when "previous"
- toSelect = tabs[(currentTab.index - 1 + tabs.length) % tabs.length]
- when "first"
- toSelect = tabs[0]
- when "last"
- toSelect = tabs[tabs.length - 1]
- selectionChangedHandlers.push(callback)
- chrome.tabs.update(toSelect.id, { selected: true })))
+ switch direction
+ when "next"
+ toSelect = tabs[(currentTab.index + 1 + tabs.length) % tabs.length]
+ when "previous"
+ toSelect = tabs[(currentTab.index - 1 + tabs.length) % tabs.length]
+ when "first"
+ toSelect = tabs[0]
+ when "last"
+ toSelect = tabs[tabs.length - 1]
+ selectionChangedHandlers.push(callback)
+ chrome.tabs.update(toSelect.id, { selected: true })))
updateOpenTabs = (tab) ->
openTabs[tab.id] = { url: tab.url, positionIndex: tab.index, windowId: tab.windowId }
@@ -367,7 +367,7 @@ updatePositionsAndWindowsForAllTabsInWindow = (windowId) ->
splitKeyIntoFirstAndSecond = (key) ->
if (key.search(namedKeyRegex) == 0)
- { first: RegExp.$1, second: RegExp.$2 }
+ { first: RegExp.$1, second: RegExp.$2 }
else
{ first: key[0], second: key.slice(1) }
@@ -409,7 +409,7 @@ generateCompletionKeys = (keysToCheck) ->
for key of Commands.keyToCommandRegistry
splitKey = splitKeyIntoFirstAndSecond(key)
if (splitKey.first == command)
- completionKeys.push(splitKey.second)
+ completionKeys.push(splitKey.second)
completionKeys