Fix :enew not working

Fixes #214
This commit is contained in:
Edvin Hultberg 2018-05-29 23:09:45 +02:00
parent b9b3ba3e9f
commit a33959f829

View file

@ -3,6 +3,7 @@ CommandError = require './command-error'
fs = require 'fs-plus'
VimOption = require './vim-option'
_ = require 'underscore-plus'
atom
defer = () ->
deferred = {}
@ -210,9 +211,7 @@ class Ex
e: (args) => @edit(args)
enew: ->
buffer = atom.workspace.getActiveTextEditor().buffer
buffer.setPath(undefined)
buffer.load()
atom.workspace.open()
write: ({ range, args, editor, saveas }) ->
saveas ?= false