mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Add 'pane:close' event, which destroys all pane items.
Still have some issues with the presentation order of dialogs with multiple unsaved buffers and no paths. But for the 99% case this works as is.
This commit is contained in:
committed by
probablycorey
parent
da986b6a6c
commit
48c693d756
@@ -30,6 +30,7 @@ class Pane extends View
|
||||
@command 'pane:split-right', => @splitRight()
|
||||
@command 'pane:split-up', => @splitUp()
|
||||
@command 'pane:split-down', => @splitDown()
|
||||
@command 'pane:close', => @destroyItems()
|
||||
@on 'focus', => @activeView.focus(); false
|
||||
@on 'focusin', => @makeActive()
|
||||
|
||||
@@ -108,6 +109,9 @@ class Pane extends View
|
||||
else
|
||||
reallyDestroyItem()
|
||||
|
||||
destroyItems: ->
|
||||
@destroyItem(item) for item in @getItems()
|
||||
|
||||
promptToSaveItem: (item, nextAction) ->
|
||||
path = item.getPath()
|
||||
atom.confirm(
|
||||
|
||||
Reference in New Issue
Block a user