aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Crosby2014-08-16 10:30:56 -0700
committerPhil Crosby2014-08-16 10:30:56 -0700
commitcda32ddd082a92ac89dc29f73f65785aff18972f (patch)
tree4535b24e9303a7955941d032bc598e5a52c5c7e0
parent491f4b18ab841cb3f5a61661fb457281e9d4a3ee (diff)
parent56336a5b47df31b2ae8799f6cf3840fa381df131 (diff)
downloadvimium-cda32ddd082a92ac89dc29f73f65785aff18972f.tar.bz2
Merge pull request #1075 from mrmr1993/incognitoNewWindow
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 8f94eb04..93ef1449 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")