Comparar commits
3 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 624dda977a | |||
| 9aa42f21c1 | |||
| 0d5bf57862 |
@@ -287,6 +287,20 @@ describe "WorkspaceView", ->
|
||||
expect(atom.workspaceView.getActivePaneView().getItems()).toHaveLength 0
|
||||
expect(atom.workspaceView.getPaneViews()).toHaveLength 1
|
||||
|
||||
it "closes the window after the last pane is closed if closeWindowAfterLastItem is true", ->
|
||||
atom.config.set('core.closeWindowAfterLastItem', true)
|
||||
atom.workspaceView.trigger('core:close')
|
||||
spyOn(atom, 'close')
|
||||
expect(atom.close).toHaveBeenCalled()
|
||||
|
||||
it "does not close the window after the last pane if closeWindowAfterLastItem is untrue", ->
|
||||
atom.config.set('core.closeWindowAfterLastItem', false)
|
||||
atom.workspaceView.trigger('core:close')
|
||||
spyOn(atom, 'close')
|
||||
expect(atom.close).not.toHaveBeenCalled()
|
||||
|
||||
|
||||
|
||||
describe "the scrollbar visibility class", ->
|
||||
it "has a class based on the style of the scrollbar", ->
|
||||
scrollbarStyle = require 'scrollbar-style'
|
||||
|
||||
@@ -72,6 +72,7 @@ class WorkspaceView extends View
|
||||
audioBeep: true
|
||||
destroyEmptyPanes: true
|
||||
useReactEditor: false
|
||||
closeWindowAfterLastItem: true
|
||||
|
||||
@content: ->
|
||||
@div class: 'workspace', tabindex: -1, =>
|
||||
@@ -154,7 +155,15 @@ class WorkspaceView extends View
|
||||
|
||||
@command 'pane:reopen-closed-item', => @getModel().reopenItem()
|
||||
|
||||
@command 'core:close', => if @getModel().getActivePaneItem()? then @destroyActivePaneItem() else @destroyActivePane()
|
||||
@command 'core:close', =>
|
||||
if @getModel().getActivePaneItem()?
|
||||
@destroyActivePaneItem()
|
||||
else
|
||||
@destroyActivePane()
|
||||
|
||||
if atom.config.get('core.closeWindowAfterLastItem') and not @getModel().getActivePaneItem()
|
||||
atom.close()
|
||||
|
||||
@command 'core:save', => @saveActivePaneItem()
|
||||
@command 'core:save-as', => @saveActivePaneItemAs()
|
||||
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário