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:
commit
57a64ca509
|
@ -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)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue