Fixed fail new file save :w

This commit is contained in:
henteko 2016-08-09 00:58:29 +09:00
parent a59a6f9364
commit 93a56c75ce
2 changed files with 2 additions and 6 deletions

View file

@ -222,11 +222,7 @@ class Ex
if not saved and fullPath?
if not force and fs.existsSync(fullPath)
throw new CommandError("File exists (add ! to override)")
if saveas
editor = atom.workspace.getActiveTextEditor()
trySave(-> editor.saveAs(fullPath, editor)).then(deferred.resolve)
else
trySave(-> saveAs(fullPath, editor)).then(deferred.resolve)
trySave(-> editor.saveAs(fullPath, editor)).then(deferred.resolve)
deferred.promise