diff --git a/src/app/editor.coffee b/src/app/editor.coffee index e52475c7c..4176df1b0 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -517,14 +517,14 @@ class Editor extends View $(window).off 'resize', @_setSoftWrapColumn save: (onSuccess) -> - if not @getPath() + if @getPath() + @getBuffer().save() + onSuccess?() + else atom.showSaveDialog (path) => if path @getBuffer().saveAs(path) - onSuccess() - else - @getBuffer().save() - onSuccess() + onSuccess?() subscribeToFontSize: -> return unless rootView = @rootView()