Merge pull request #1804 from szeck87/master

Fix for #1721. Changes required due to TextBuffer.save becoming async in Atom 1.19
This commit is contained in:
Glavin Wiechert 2017-08-11 22:15:12 -03:00 committed by GitHub
commit 57a64ca509
1 changed files with 4 additions and 3 deletions

View File

@ -542,10 +542,11 @@ handleSaveEvent = ->
# It will add a newline and keep the file from converging on a beautified form # It will add a newline and keep the file from converging on a beautified form
# and saving without emitting onDidSave event, because there were no changes. # and saving without emitting onDidSave event, because there were no changes.
pendingPaths[filePath] = true pendingPaths[filePath] = true
editor.save() Promise.resolve(editor.save()).then(() ->
delete pendingPaths[filePath] delete pendingPaths[filePath]
logger.verbose('Saved TextEditor.') logger.verbose('Saved TextEditor.')
) )
)
.catch((error) -> .catch((error) ->
return showError(error) return showError(error)
) )