Skip to content

Commit

Permalink
Merge pull request #82 from monsterkodi/master
Browse files Browse the repository at this point in the history
using uri to detect settings view and changed test
  • Loading branch information
ddavison committed Mar 25, 2015
2 parents 7dae7ec + b0425e3 commit 2a4081b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/sublime-tab-bar-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SublimeTabBarView extends TabBarView
false

addTabForItem: (item, index) ->
if item.activePanelName != "Settings"
if item.uri != "atom://config"
for tab in @getTabs()
@closeTab(tab) if tab.is('.temp')

Expand Down
5 changes: 3 additions & 2 deletions spec/sublime-tabs-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ describe 'SublimeTabBarView', ->
expect(tabBar.tabForItem(settingsView)).toExist()
expect(tabBar.tabForItem(settingsView)).not.toHaveClass 'temp'

it 'replaces an existing temp tab', ->
expect(tabBar.tabForItem(editor2)).not.toExist()
it 'keeps an existing temp tab', ->
expect(tabBar.tabForItem(editor2)).toExist()
expect(tabBar.tabForItem(editor2)).toHaveClass 'temp'

describe 'when opening an image', ->
it 'should be temporary', ->
Expand Down

0 comments on commit 2a4081b

Please sign in to comment.