We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b4c595c + 2796e32 commit 134cf5eCopy full SHA for 134cf5e
src/sidebar/views/reports.ts
@@ -93,7 +93,14 @@ export class ReportsView implements TreeDataProvider<ReportTreeItem> {
93
94
constructor(ctx: ExtensionContext) {
95
ctx.subscriptions.push(this._onDidChangeTreeData = new EventEmitter());
96
- window.onDidChangeActiveTextEditor(this.refreshBugList, this, ctx.subscriptions);
+ window.onDidChangeActiveTextEditor(editor => {
97
+ // this event is called twice by vscode. Ignore deactivation of the old editor.
98
+ if (!editor) {
99
+ return;
100
+ }
101
+
102
+ this.refreshBugList();
103
+ }, this, ctx.subscriptions);
104
105
ExtensionApi.diagnostics.diagnosticsUpdated(() => {
106
// FIXME: fired twice when a file is opened freshly.
0 commit comments