Merge be57a66916 into da8405b387
This commit is contained in:
commit
65b7d0a512
1 changed files with 2 additions and 0 deletions
|
|
@ -112,6 +112,8 @@ class Ex
|
||||||
if filePath.indexOf(' ') isnt -1
|
if filePath.indexOf(' ') isnt -1
|
||||||
throw new CommandError('Only one file name allowed')
|
throw new CommandError('Only one file name allowed')
|
||||||
buffer = atom.workspace.getActiveTextEditor().buffer
|
buffer = atom.workspace.getActiveTextEditor().buffer
|
||||||
|
if filePath is '' and not buffer.getPath()?
|
||||||
|
throw new CommandError('Nothing to edit')
|
||||||
filePath = buffer.getPath() if filePath is ''
|
filePath = buffer.getPath() if filePath is ''
|
||||||
buffer.setPath(getFullPath(filePath))
|
buffer.setPath(getFullPath(filePath))
|
||||||
buffer.load()
|
buffer.load()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue