Prompt to save when unloading if editor is in conflict

This commit is contained in:
Max Brunsfeld
2017-10-03 10:01:53 -07:00
parent 3a3c58e04e
commit 4d057a16d6
3 changed files with 51 additions and 32 deletions

View File

@@ -961,7 +961,7 @@ class TextEditor extends Model
# this editor.
shouldPromptToSave: ({windowCloseRequested, projectHasPaths}={}) ->
if windowCloseRequested and projectHasPaths and atom.stateStore.isConnected()
false
@buffer.isInConflict()
else
@isModified() and not @buffer.hasMultipleEditors()