Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Watch for active pane item change in workspace center only
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kuychaco committed Nov 3, 2018
1 parent 692ea4c commit 2ab46e7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/watch-workspace-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2ab46e7

Please sign in to comment.