From 2ab46e71ada787685df0219370fa0f13699163bc Mon Sep 17 00:00:00 2001 From: Katrina Uychaco Date: Fri, 2 Nov 2018 19:20:09 -0700 Subject: [PATCH] Watch for active pane item change in workspace center only If we watch for changes on the workspace then we don't get an event in the case that an already-open file is clicked in tree-view, because tree-view remains the active item --- lib/watch-workspace-item.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/watch-workspace-item.js b/lib/watch-workspace-item.js index 319568e6d4..dc2fcd1077 100644 --- a/lib/watch-workspace-item.js +++ b/lib/watch-workspace-item.js @@ -113,8 +113,7 @@ class ActiveItemWatcher { subscribeToWorkspace() { this.subs.dispose(); this.subs = new CompositeDisposable( - this.workspace.onDidChangeActivePaneItem(this.updateActiveState), - this.workspace.onDidDestroyPaneItem(this.updateActiveState), + this.workspace.getCenter().onDidChangeActivePaneItem(this.updateActiveState), ); return this; }