mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Panes prompt to save modified items before destroying them
This commit is contained in:
committed by
probablycorey
parent
d5654cf0df
commit
9f7b804a6c
@@ -684,17 +684,6 @@ class Editor extends View
|
||||
pane: ->
|
||||
@closest('.pane').view()
|
||||
|
||||
promptToSaveDirtySession: (session, callback) ->
|
||||
path = session.getPath()
|
||||
filename = if path then fs.base(path) else "untitled buffer"
|
||||
atom.confirm(
|
||||
"'#{filename}' has changes, do you want to save them?"
|
||||
"Your changes will be lost if you don't save them"
|
||||
"Save", => @save(session, callback),
|
||||
"Cancel", null
|
||||
"Don't Save", callback
|
||||
)
|
||||
|
||||
remove: (selector, keepData) ->
|
||||
return super if keepData or @removed
|
||||
@trigger 'editor:will-be-removed'
|
||||
|
||||
Reference in New Issue
Block a user