aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormrmr19932014-06-21 20:31:49 +0100
committermrmr19932014-06-21 20:31:49 +0100
commit56336a5b47df31b2ae8799f6cf3840fa381df131 (patch)
tree626b3c5c36869051d8193b4a0e293728efd06c07
parentc5989eb9c001429f11beff44f47adadca1784467 (diff)
downloadvimium-56336a5b47df31b2ae8799f6cf3840fa381df131.tar.bz2
Fix "move tab to new window" for incognito tabs
-rw-r--r--background_scripts/main.coffee5
1 files changed, 3 insertions, 2 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 3b7670d4..072745d7 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -236,8 +236,9 @@ BackgroundCommands =
chrome.tabs.duplicate(tab.id)
selectionChangedHandlers.push(callback))
moveTabToNewWindow: (callback) ->
- chrome.tabs.getSelected(null, (tab) ->
- chrome.windows.create({tabId: tab.id}))
+ chrome.tabs.query {active: true, currentWindow: true}, (tabs) ->
+ tab = tabs[0]
+ chrome.windows.create {tabId: tab.id, incognito: tab.incognito}
nextTab: (callback) -> selectTab(callback, "next")
previousTab: (callback) -> selectTab(callback, "previous")
firstTab: (callback) -> selectTab(callback, "first")