restore edit behaviour: open in current buffer

This commit is contained in:
Rom Grk 2015-05-29 15:43:44 -04:00
parent 394dd1dffa
commit 6d723b8a4a

View file

@ -104,10 +104,10 @@ class Ex
filePath = filePath.trim()
if filePath.indexOf(' ') isnt -1
throw new CommandError('Only one file name allowed')
filePath = getFullPath filePath
atom.workspace.open(filePath)
buffer = atom.workspace.getActiveTextEditor().buffer
filePath = buffer.getPath() if filePath is ''
buffer.setPath(getFullPath(filePath))
buffer.load()
e: (args...) => @edit(args...)