From ed1500dab398ecf78a6c1ea3336e46476f79d757 Mon Sep 17 00:00:00 2001 From: Yuri Kovalov Date: Wed, 24 Jul 2019 15:05:47 +0800 Subject: [PATCH] Search all panes when opening a file Utilizes the `searchAllPanes` option when opening a file, which will focus the editor if the test or module file is already open on another tab. Docs: https://atom.io/docs/api/v1.39.0/Workspace#instance-open --- lib/elixir-jump-around.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/elixir-jump-around.js b/lib/elixir-jump-around.js index cd1e610..472788e 100644 --- a/lib/elixir-jump-around.js +++ b/lib/elixir-jump-around.js @@ -23,10 +23,11 @@ export default { toggle_test_file() { currentFilePath = atom.workspace.getActiveTextEditor().getPath(); + opts = {searchAllPanes: true} if (this.isTestFilePath(currentFilePath)) { - return atom.workspace.open(this.getModulePath(currentFilePath)); + return atom.workspace.open(this.getModulePath(currentFilePath), opts); } else { - return atom.workspace.open(this.getTestPath(currentFilePath)); + return atom.workspace.open(this.getTestPath(currentFilePath), opts); } },