From 5699b1b58c2cf4b102e3e838b91f6ea9319c7c4c Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 26 May 2015 16:22:40 +0200 Subject: [PATCH] Update ./lib/pipe.coffe to use current API 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." --- lib/pipe.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/pipe.coffee b/lib/pipe.coffee index 97ada8a..c9de027 100644 --- a/lib/pipe.coffee +++ b/lib/pipe.coffee @@ -9,10 +9,11 @@ module.exports = 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() -- 2.39.2