mirror of
https://github.com/atom/atom.git
synced 2026-02-13 16:14:59 -05:00
Merge pull request #12922 from stereobooster/10474-prompt-to-save-unsaved-buffer
Fix for #10474
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user