Merge pull request #12922 from stereobooster/10474-prompt-to-save-unsaved-buffer

Fix for #10474
This commit is contained in:
Ian Olsen
2016-10-26 16:35:43 -07:00
committed by GitHub
3 changed files with 19 additions and 4 deletions

View File

@@ -892,8 +892,8 @@ class TextEditor extends Model
# Determine whether the user should be prompted to save before closing
# this editor.
shouldPromptToSave: ({windowCloseRequested}={}) ->
if windowCloseRequested
shouldPromptToSave: ({windowCloseRequested, projectHasPaths}={}) ->
if windowCloseRequested and projectHasPaths
false
else
@isModified() and not @buffer.hasMultipleEditors()