From 1a801c2a8417e1ddf1ccc53c6e41c3f999b4f910 Mon Sep 17 00:00:00 2001 From: Philip McCullick Date: Fri, 11 Sep 2015 22:47:02 -0700 Subject: [PATCH 1/7] Add drag to create new window function --- lib/tab-bar-view.coffee | 64 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 6 deletions(-) diff --git a/lib/tab-bar-view.coffee b/lib/tab-bar-view.coffee index 95e25007..43881379 100644 --- a/lib/tab-bar-view.coffee +++ b/lib/tab-bar-view.coffee @@ -101,9 +101,11 @@ class TabBarView extends View false RendererIpc.on('tab:dropped', @onDropOnOtherWindow) + RendererIpc.on('tab:new-window-opened', @onNewWindowCreated) unsubscribe: -> RendererIpc.removeListener('tab:dropped', @onDropOnOtherWindow) + RendererIpc.removeListener('tab:new-window-opened', @onNewWindowCreated) @subscriptions.dispose() handleTreeViewEvents: -> @@ -251,12 +253,7 @@ class TabBarView extends View item = @pane.getItems()[element.index()] return unless item? - if typeof item.getURI is 'function' - itemURI = item.getURI() ? '' - else if typeof item.getPath is 'function' - itemURI = item.getPath() ? '' - else if typeof item.getUri is 'function' - itemURI = item.getUri() ? '' + itemURI = @getItemURI item if itemURI? event.originalEvent.dataTransfer.setData 'text/plain', itemURI @@ -269,6 +266,55 @@ class TabBarView extends View event.originalEvent.dataTransfer.setData 'has-unsaved-changes', 'true' event.originalEvent.dataTransfer.setData 'modified-text', item.getText() + getItemURI: (item) => + if typeof item.getURI is 'function' + itemURI = item.getURI() ? '' + else if typeof item.getPath is 'function' + itemURI = item.getPath() ? '' + else if typeof item.getUri is 'function' + itemURI = item.getUri() ? '' + + onNewWindowCreated: (title, openURI, hasUnsavedChanges, modifiedText, scrollTop) => + #remove any panes created by opening the window + for item in @pane.getItems() + @pane.destroyItem(item) + + # open the content and reset state based on previous state + atom.workspace.open(openURI).then (item) => + item.setText?(modifiedText) if hasUnsavedChanges + item.setScrollTop?(scrollTop); + atom.focus() + + openTabInNewWindow: (tab, windowX=0, windowY=0) => + item = @pane.getItems()[$(tab).index()] + + atom.commands.dispatch(@element, 'application:new-window'); + + # find the new window + BrowserWindow ?= require('remote').require('browser-window') + windows = BrowserWindow.getAllWindows() + newWindow = windows[windows.length - 1] + + # move the tab to the new window + newWindow.webContents.once 'did-finish-load', => + newWindow.setPosition(windowX, windowY) + hasUnsavedChanges = false + itemText = "" + itemScrollTop = 0 + if item.getScrollTop?() + itemScrollTop = item.getScrollTop() + if item.isModified?() + hasUnsavedChanges = item.isModified() + if hasUnsavedChanges + itemText = item.getText(); + + newWindow.send("tab:new-window-opened", item.getTitle(), @getItemURI(item), hasUnsavedChanges, itemText, itemScrollTop) + + # clear changes so moved item can be closed without a warning + if item.getBuffer?() + item.getBuffer().reload() + @pane.destroyItem(item) + uriHasProtocol: (uri) -> try require('url').parse(uri).protocol? @@ -279,6 +325,12 @@ class TabBarView extends View @removePlaceholder() onDragEnd: (event) => + {dataTransfer, screenX, screenY} = event.originalEvent + + #if the drop target doesn't handle the drop then this is a new window + if dataTransfer.dropEffect is "none" + @openTabInNewWindow(event.target, screenX, screenY) + @clearDropTarget() onDragOver: (event) => From 8c300408714b1b5d4f30a93832a33ab665882931 Mon Sep 17 00:00:00 2001 From: Philip McCullick Date: Sun, 13 Sep 2015 21:29:11 -0700 Subject: [PATCH 2/7] added basic test for calling open new window when drop is not handled --- spec/tabs-spec.coffee | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/spec/tabs-spec.coffee b/spec/tabs-spec.coffee index 132b11c8..15ed80df 100644 --- a/spec/tabs-spec.coffee +++ b/spec/tabs-spec.coffee @@ -1,3 +1,4 @@ +BrowserWindow = null {$, View} = require 'atom-space-pen-views' _ = require 'underscore-plus' path = require 'path' @@ -673,6 +674,22 @@ describe "TabBarView", -> if process.platform is 'darwin' expect(dragStartEvent.originalEvent.dataTransfer.getData("text/uri-list")).toEqual "file://#{editor1.getPath()}" + it "should open a new window if the target doesn't handle the file information", -> + [dragStartEvent, dropEvent] = buildDragEvents(tabBar.tabAtIndex(1), tabBar.tabAtIndex(0)) + expect(pane.getActiveItem()).toBe item2 + spyOn(tabBar, "openTabInNewWindow").andCallThrough() + BrowserWindow ?= require('remote').require('browser-window') + + tabBar.onDragStart(dragStartEvent) + dropEvent.originalEvent.dataTransfer.dropEffect = "none" + dropEvent.originalEvent.screenX = 10 + dropEvent.originalEvent.screenY = 20 + tabBar.onDragEnd(dropEvent) + + expect(BrowserWindow.getAllWindows().length).toBe (windowCount + 1) + expect(tabBar.openTabInNewWindow).toHaveBeenCalledWith(dropEvent.target, 10, 20) + + describe "when a tab is dragged to another Atom window", -> it "closes the tab in the first window and opens the tab in the second window", -> [dragStartEvent, dropEvent] = buildDragEvents(tabBar.tabAtIndex(1), tabBar.tabAtIndex(0)) From 8e7f35432a54eb1981564d74af46561c99825549 Mon Sep 17 00:00:00 2001 From: Philip McCullick Date: Wed, 16 Sep 2015 06:31:12 -0700 Subject: [PATCH 3/7] Add right click tab to open in new window --- lib/tab-bar-view.coffee | 24 ++++++++++++++++++++++-- menus/tabs.cson | 4 ++++ spec/tabs-spec.coffee | 1 - 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/lib/tab-bar-view.coffee b/lib/tab-bar-view.coffee index 43881379..8411d412 100644 --- a/lib/tab-bar-view.coffee +++ b/lib/tab-bar-view.coffee @@ -41,6 +41,7 @@ class TabBarView extends View 'tabs:split-down': => @splitTab('splitDown') 'tabs:split-left': => @splitTab('splitLeft') 'tabs:split-right': => @splitTab('splitRight') + 'tabs:open-in-new-window': => @onOpenInNewWindow() @on 'dragstart', '.sortable', @onDragStart @on 'dragend', '.sortable', @onDragEnd @@ -284,11 +285,17 @@ class TabBarView extends View item.setText?(modifiedText) if hasUnsavedChanges item.setScrollTop?(scrollTop); atom.focus() + onOpenInNewWindow: (e) => + tab = $(event.target).closest('.sortable') + @openTabInNewWindow(tab, window.screenX + 50, window.screenY + 50) openTabInNewWindow: (tab, windowX=0, windowY=0) => item = @pane.getItems()[$(tab).index()] - atom.commands.dispatch(@element, 'application:new-window'); + itemURI = @getItemURI(item); + return unless itemURI? + + atom.commands.dispatch(@element, 'application:new-window') # find the new window BrowserWindow ?= require('remote').require('browser-window') @@ -297,7 +304,20 @@ class TabBarView extends View # move the tab to the new window newWindow.webContents.once 'did-finish-load', => + WINDOW_MIN_WIDTH_HEIGHT = 300 + windowWidth = Math.min(window.innerWidth, window.screen.availWidth - windowX) + windowHeight = Math.min(window.innerHeight, window.screen.availHeight - windowY) + if windowWidth < WINDOW_MIN_WIDTH_HEIGHT + windowWidth = WINDOW_MIN_WIDTH_HEIGHT + windowX = window.screen.availWidth - WINDOW_MIN_WIDTH_HEIGHT + + if windowHeight < WINDOW_MIN_WIDTH_HEIGHT + windowHeight = WINDOW_MIN_WIDTH_HEIGHT + windowY = window.screen.availHeight - WINDOW_MIN_WIDTH_HEIGHT + newWindow.setPosition(windowX, windowY) + newWindow.setSize(windowWidth,windowHeight) + hasUnsavedChanges = false itemText = "" itemScrollTop = 0 @@ -308,7 +328,7 @@ class TabBarView extends View if hasUnsavedChanges itemText = item.getText(); - newWindow.send("tab:new-window-opened", item.getTitle(), @getItemURI(item), hasUnsavedChanges, itemText, itemScrollTop) + newWindow.send('tab:new-window-opened', item.getTitle(), itemURI, hasUnsavedChanges, itemText, itemScrollTop) # clear changes so moved item can be closed without a warning if item.getBuffer?() diff --git a/menus/tabs.cson b/menus/tabs.cson index 7bc02c13..36c53c46 100644 --- a/menus/tabs.cson +++ b/menus/tabs.cson @@ -8,6 +8,10 @@ {type: 'separator'} + {label: 'Open In New Window', command: 'tabs:open-in-new-window'} + + {type: 'separator'} + {label: 'Split Up', command: 'tabs:split-up'} {label: 'Split Down', command: 'tabs:split-down'} {label: 'Split Left', command: 'tabs:split-left'} diff --git a/spec/tabs-spec.coffee b/spec/tabs-spec.coffee index 15ed80df..e784e6be 100644 --- a/spec/tabs-spec.coffee +++ b/spec/tabs-spec.coffee @@ -689,7 +689,6 @@ describe "TabBarView", -> expect(BrowserWindow.getAllWindows().length).toBe (windowCount + 1) expect(tabBar.openTabInNewWindow).toHaveBeenCalledWith(dropEvent.target, 10, 20) - describe "when a tab is dragged to another Atom window", -> it "closes the tab in the first window and opens the tab in the second window", -> [dragStartEvent, dropEvent] = buildDragEvents(tabBar.tabAtIndex(1), tabBar.tabAtIndex(0)) From d14b0633ebe825cd92c9d347d65355f79d8efa0e Mon Sep 17 00:00:00 2001 From: Philip McCullick Date: Wed, 16 Sep 2015 20:01:25 -0700 Subject: [PATCH 4/7] Wait until new window is finished opening tab before closing old tab --- lib/tab-bar-view.coffee | 90 ++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 42 deletions(-) diff --git a/lib/tab-bar-view.coffee b/lib/tab-bar-view.coffee index 8411d412..a1d410db 100644 --- a/lib/tab-bar-view.coffee +++ b/lib/tab-bar-view.coffee @@ -102,11 +102,12 @@ class TabBarView extends View false RendererIpc.on('tab:dropped', @onDropOnOtherWindow) - RendererIpc.on('tab:new-window-opened', @onNewWindowCreated) + RendererIpc.on('tab:new-window-opened', @onNewWindowOpened) unsubscribe: -> RendererIpc.removeListener('tab:dropped', @onDropOnOtherWindow) - RendererIpc.removeListener('tab:new-window-opened', @onNewWindowCreated) + RendererIpc.removeListener('tab:new-window-opened', @onNewWindowOpened) + @subscriptions.dispose() handleTreeViewEvents: -> @@ -268,14 +269,14 @@ class TabBarView extends View event.originalEvent.dataTransfer.setData 'modified-text', item.getText() getItemURI: (item) => - if typeof item.getURI is 'function' + if item.getURI is 'function' itemURI = item.getURI() ? '' else if typeof item.getPath is 'function' itemURI = item.getPath() ? '' else if typeof item.getUri is 'function' itemURI = item.getUri() ? '' - onNewWindowCreated: (title, openURI, hasUnsavedChanges, modifiedText, scrollTop) => + onNewWindowOpened: (title, openURI, hasUnsavedChanges, modifiedText, scrollTop, fromWindowId) => #remove any panes created by opening the window for item in @pane.getItems() @pane.destroyItem(item) @@ -284,56 +285,61 @@ class TabBarView extends View atom.workspace.open(openURI).then (item) => item.setText?(modifiedText) if hasUnsavedChanges item.setScrollTop?(scrollTop); + atom.focus() + + browserWindow = @browserWindowForId(fromWindowId) + browserWindow?.webContents.send('tab:item-moved-to-window') + onOpenInNewWindow: (e) => tab = $(event.target).closest('.sortable') - @openTabInNewWindow(tab, window.screenX + 50, window.screenY + 50) + @openTabInNewWindow(tab, window.screenX + 20, window.screenY + 20) openTabInNewWindow: (tab, windowX=0, windowY=0) => - item = @pane.getItems()[$(tab).index()] - - itemURI = @getItemURI(item); - return unless itemURI? - + # open and then find the new window atom.commands.dispatch(@element, 'application:new-window') - - # find the new window BrowserWindow ?= require('remote').require('browser-window') windows = BrowserWindow.getAllWindows() newWindow = windows[windows.length - 1] + item = @pane.getItems()[$(tab).index()] + itemURI = @getItemURI(item); + # move the tab to the new window newWindow.webContents.once 'did-finish-load', => - WINDOW_MIN_WIDTH_HEIGHT = 300 - windowWidth = Math.min(window.innerWidth, window.screen.availWidth - windowX) - windowHeight = Math.min(window.innerHeight, window.screen.availHeight - windowY) - if windowWidth < WINDOW_MIN_WIDTH_HEIGHT - windowWidth = WINDOW_MIN_WIDTH_HEIGHT - windowX = window.screen.availWidth - WINDOW_MIN_WIDTH_HEIGHT - - if windowHeight < WINDOW_MIN_WIDTH_HEIGHT - windowHeight = WINDOW_MIN_WIDTH_HEIGHT - windowY = window.screen.availHeight - WINDOW_MIN_WIDTH_HEIGHT - - newWindow.setPosition(windowX, windowY) - newWindow.setSize(windowWidth,windowHeight) - - hasUnsavedChanges = false - itemText = "" - itemScrollTop = 0 - if item.getScrollTop?() - itemScrollTop = item.getScrollTop() - if item.isModified?() - hasUnsavedChanges = item.isModified() - if hasUnsavedChanges - itemText = item.getText(); - - newWindow.send('tab:new-window-opened', item.getTitle(), itemURI, hasUnsavedChanges, itemText, itemScrollTop) - - # clear changes so moved item can be closed without a warning - if item.getBuffer?() - item.getBuffer().reload() - @pane.destroyItem(item) + @moveAndSizeNewWindow(newWindow, windowX, windowY) + itemScrollTop = item.getScrollTop?() ? 0 + hasUnsavedChanges = item.isModified?() ? false + itemText = if hasUnsavedChanges then item.getText() else ""; + + #tell the new window to open this item and pass the current item state + newWindow.send('tab:new-window-opened', + item.getTitle(), itemURI, hasUnsavedChanges, + itemText, itemScrollTop, @getWindowId()) + + #listen for open success, so old tab can be removed + RendererIpc.on('tab:item-moved-to-window', => @onTabMovedToWindow(item)) + + onTabMovedToWindow: (item) -> + # clear changes so moved item can be closed without a warning + item.getBuffer?().reload() + @pane.destroyItem(item) + RendererIpc.removeListener('tab:item-moved-to-window', @onTabMovedToWindow) + + moveAndSizeNewWindow: (newWindow, windowX=0, windowY=0) -> + WINDOW_MIN_WIDTH_HEIGHT = 300 + windowWidth = Math.min(window.innerWidth, window.screen.availWidth - windowX) + windowHeight = Math.min(window.innerHeight, window.screen.availHeight - windowY) + if windowWidth < WINDOW_MIN_WIDTH_HEIGHT + windowWidth = WINDOW_MIN_WIDTH_HEIGHT + windowX = window.screen.availWidth - WINDOW_MIN_WIDTH_HEIGHT + + if windowHeight < WINDOW_MIN_WIDTH_HEIGHT + windowHeight = WINDOW_MIN_WIDTH_HEIGHT + windowY = window.screen.availHeight - WINDOW_MIN_WIDTH_HEIGHT + + newWindow.setPosition(windowX, windowY) + newWindow.setSize(windowWidth,windowHeight) uriHasProtocol: (uri) -> try From 2f4c1b41a63b9efd5103ca824df9fae53b01abcf Mon Sep 17 00:00:00 2001 From: Philip McCullick Date: Wed, 16 Sep 2015 22:21:06 -0700 Subject: [PATCH 5/7] Add tests for right click command --- lib/tab-bar-view.coffee | 19 +++++++++++-------- spec/tabs-spec.coffee | 37 +++++++++++++++++++++++++++++++++---- 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/lib/tab-bar-view.coffee b/lib/tab-bar-view.coffee index a1d410db..5e6960b4 100644 --- a/lib/tab-bar-view.coffee +++ b/lib/tab-bar-view.coffee @@ -268,8 +268,9 @@ class TabBarView extends View event.originalEvent.dataTransfer.setData 'has-unsaved-changes', 'true' event.originalEvent.dataTransfer.setData 'modified-text', item.getText() - getItemURI: (item) => - if item.getURI is 'function' + getItemURI: (item) -> + return unless item? + if typeof item.getURI is 'function' itemURI = item.getURI() ? '' else if typeof item.getPath is 'function' itemURI = item.getPath() ? '' @@ -291,20 +292,22 @@ class TabBarView extends View browserWindow = @browserWindowForId(fromWindowId) browserWindow?.webContents.send('tab:item-moved-to-window') - onOpenInNewWindow: (e) => - tab = $(event.target).closest('.sortable') - @openTabInNewWindow(tab, window.screenX + 20, window.screenY + 20) + onOpenInNewWindow: (active) => + tabs = @getTabs() + active ?= @children('.right-clicked')[0] + @openTabInNewWindow(active, window.screenX + 20, window.screenY + 20) openTabInNewWindow: (tab, windowX=0, windowY=0) => + item = @pane.getItems()[$(tab).index()] + itemURI = @getItemURI(item); + return unless itemURI? + # open and then find the new window atom.commands.dispatch(@element, 'application:new-window') BrowserWindow ?= require('remote').require('browser-window') windows = BrowserWindow.getAllWindows() newWindow = windows[windows.length - 1] - item = @pane.getItems()[$(tab).index()] - itemURI = @getItemURI(item); - # move the tab to the new window newWindow.webContents.once 'did-finish-load', => @moveAndSizeNewWindow(newWindow, windowX, windowY) diff --git a/spec/tabs-spec.coffee b/spec/tabs-spec.coffee index e784e6be..acfcc250 100644 --- a/spec/tabs-spec.coffee +++ b/spec/tabs-spec.coffee @@ -430,6 +430,23 @@ describe "TabBarView", -> expect(pane.getItems().length).toBe 1 expect(pane.getItems()[0]).toBe item1 + describe "when tabs:open-in-new-window is fired", -> + it "calls the open new window command with the selected tab", -> + spyOn(tabBar, "onOpenInNewWindow").andCallThrough() + spyOn(tabBar, "openTabInNewWindow").andCallThrough() + spyOn(atom.workspace, "open").andCallThrough() + + triggerMouseDownEvent(tabBar.tabForItem(editor1), which: 3) + atom.commands.dispatch(tabBar.element, 'tabs:open-in-new-window') + + waitsFor -> + atom.workspace.open() + + runs -> + expect(tabBar.onOpenInNewWindow).toHaveBeenCalled() + expect(tabBar.openTabInNewWindow).toHaveBeenCalled() + expect(atom.workspace.open).toHaveBeenCalled() + describe "when tabs:split-up is fired", -> it "splits the selected tab up", -> triggerMouseDownEvent(tabBar.tabForItem(item2), which: 3) @@ -522,6 +539,15 @@ describe "TabBarView", -> expect(pane.getItems()[0]).toBe item1 describe "dragging and dropping tabs", -> + describe "when getting dragged tab's URI", -> + it "getItemURI returns the tab location information", -> + + itemWithNoURI = tabBar.getItemURI(item1) + expect(itemWithNoURI).not.toBeDefined() + + itemWithURI = tabBar.getItemURI(editor1) + expect(itemWithURI).toBe editor1.getURI() + describe "when a tab is dragged within the same pane", -> describe "when it is dropped on tab that's later in the list", -> it "moves the tab and its item, shows the tab's item, and focuses the pane", -> @@ -676,9 +702,8 @@ describe "TabBarView", -> it "should open a new window if the target doesn't handle the file information", -> [dragStartEvent, dropEvent] = buildDragEvents(tabBar.tabAtIndex(1), tabBar.tabAtIndex(0)) - expect(pane.getActiveItem()).toBe item2 spyOn(tabBar, "openTabInNewWindow").andCallThrough() - BrowserWindow ?= require('remote').require('browser-window') + spyOn(atom.workspace, "open").andCallThrough() tabBar.onDragStart(dragStartEvent) dropEvent.originalEvent.dataTransfer.dropEffect = "none" @@ -686,8 +711,12 @@ describe "TabBarView", -> dropEvent.originalEvent.screenY = 20 tabBar.onDragEnd(dropEvent) - expect(BrowserWindow.getAllWindows().length).toBe (windowCount + 1) - expect(tabBar.openTabInNewWindow).toHaveBeenCalledWith(dropEvent.target, 10, 20) + waitsFor -> + atom.workspace.open() + + runs -> + expect(tabBar.openTabInNewWindow).toHaveBeenCalledWith(dropEvent.target, 10, 20) + expect(atom.workspace.open).toHaveBeenCalled() describe "when a tab is dragged to another Atom window", -> it "closes the tab in the first window and opens the tab in the second window", -> From baa5e26cd65911501c562add2801b615c58fabc5 Mon Sep 17 00:00:00 2001 From: Philip McCullick Date: Wed, 16 Sep 2015 22:56:48 -0700 Subject: [PATCH 6/7] fixed formatting issues --- lib/tab-bar-view.coffee | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/tab-bar-view.coffee b/lib/tab-bar-view.coffee index 5e6960b4..40291ca7 100644 --- a/lib/tab-bar-view.coffee +++ b/lib/tab-bar-view.coffee @@ -283,9 +283,9 @@ class TabBarView extends View @pane.destroyItem(item) # open the content and reset state based on previous state - atom.workspace.open(openURI).then (item) => + atom.workspace.open(openURI).then (item) -> item.setText?(modifiedText) if hasUnsavedChanges - item.setScrollTop?(scrollTop); + item.setScrollTop?(scrollTop) atom.focus() @@ -299,7 +299,7 @@ class TabBarView extends View openTabInNewWindow: (tab, windowX=0, windowY=0) => item = @pane.getItems()[$(tab).index()] - itemURI = @getItemURI(item); + itemURI = @getItemURI(item) return unless itemURI? # open and then find the new window @@ -313,7 +313,7 @@ class TabBarView extends View @moveAndSizeNewWindow(newWindow, windowX, windowY) itemScrollTop = item.getScrollTop?() ? 0 hasUnsavedChanges = item.isModified?() ? false - itemText = if hasUnsavedChanges then item.getText() else ""; + itemText = if hasUnsavedChanges then item.getText() else "" #tell the new window to open this item and pass the current item state newWindow.send('tab:new-window-opened', @@ -342,7 +342,7 @@ class TabBarView extends View windowY = window.screen.availHeight - WINDOW_MIN_WIDTH_HEIGHT newWindow.setPosition(windowX, windowY) - newWindow.setSize(windowWidth,windowHeight) + newWindow.setSize(windowWidth, windowHeight) uriHasProtocol: (uri) -> try @@ -358,7 +358,7 @@ class TabBarView extends View #if the drop target doesn't handle the drop then this is a new window if dataTransfer.dropEffect is "none" - @openTabInNewWindow(event.target, screenX, screenY) + @openTabInNewWindow(event.target, screenX, screenY) @clearDropTarget() From 96b3552af069baf972d329195d85f71f929c85f4 Mon Sep 17 00:00:00 2001 From: Philip McCullick Date: Wed, 16 Sep 2015 23:01:12 -0700 Subject: [PATCH 7/7] Fix formatting issues with tabs-spec --- spec/tabs-spec.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/tabs-spec.coffee b/spec/tabs-spec.coffee index acfcc250..576b7957 100644 --- a/spec/tabs-spec.coffee +++ b/spec/tabs-spec.coffee @@ -540,13 +540,13 @@ describe "TabBarView", -> describe "dragging and dropping tabs", -> describe "when getting dragged tab's URI", -> - it "getItemURI returns the tab location information", -> + it "getItemURI returns the tab location information", -> - itemWithNoURI = tabBar.getItemURI(item1) - expect(itemWithNoURI).not.toBeDefined() + itemWithNoURI = tabBar.getItemURI(item1) + expect(itemWithNoURI).not.toBeDefined() - itemWithURI = tabBar.getItemURI(editor1) - expect(itemWithURI).toBe editor1.getURI() + itemWithURI = tabBar.getItemURI(editor1) + expect(itemWithURI).toBe editor1.getURI() describe "when a tab is dragged within the same pane", -> describe "when it is dropped on tab that's later in the list", ->