This fixes the following two deprecation warnings:
"Workspace.getActiveEditor is deprecated.
Call ::getActiveTextEditorinstead."
"atom.workspaceView is no longer available. In most cases you
will not need the view. See the Workspace docs for alternatives:
https://atom.io/docs/api/latest/Workspace. If you do need the
view, please use `atom.views.getView(atom.workspace)`, which
returns an HTMLElement."
atom.commands.add 'atom-workspace', "pipe:run", => @run()
run: ->
- editor = atom.workspace.getActiveEditor()
- view = atom.workspaceView.getActiveView()
+ editor = atom.workspace.getActiveTextEditor()
return if not editor?
+ view = atom.views.getView(atom.workspace)
+
new CommandView history, (commandString) ->
if not commandString
view.focus()