Skip to content

Commit e3858f5

Browse files
committed
Status fix for special editors
Signed-off-by: Magyarimiki <[email protected]>
1 parent 066ef56 commit e3858f5

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/editor/diagnostics.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ export class DiagnosticRenderer {
8585
ExtensionApi.diagnostics.diagnosticsUpdated(this.onDiagnosticUpdated, this, ctx.subscriptions);
8686

8787
workspace.onDidChangeTextDocument(({ document }) => {
88+
if (document.uri.scheme !== 'file') {
89+
return;
90+
}
8891
// Clear bug step decorations when there are unpersisted changes in the current active text editor.
8992
const editor = window.activeTextEditor;
9093
if (document.uri.fsPath === editor?.document.uri.fsPath) {

src/sidebar/views/reports.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ export class ReportsView implements TreeDataProvider<ReportTreeItem> {
113113
private treeItems: Map<string, ReportTreeItem> = new Map();
114114
private selectedTreeItems: ReportTreeItem[] = [];
115115
private dynamicTreeItems: Map<string, ReportTreeItem> = new Map();
116-
private rootItems: ReportTreeItem[] = [];
117116

118117
constructor(ctx: ExtensionContext) {
119118
ctx.subscriptions.push(this._onDidChangeTreeData = new EventEmitter());
@@ -122,7 +121,11 @@ export class ReportsView implements TreeDataProvider<ReportTreeItem> {
122121
if (editor === undefined) {
123122
return;
124123
}
125-
// this.refreshBugList();
124+
125+
if (editor.document.uri.scheme !== 'file') {
126+
return;
127+
}
128+
126129
this.updateStatus();
127130
}, this, ctx.subscriptions);
128131

@@ -171,6 +174,9 @@ export class ReportsView implements TreeDataProvider<ReportTreeItem> {
171174
});
172175

173176
workspace.onDidChangeTextDocument(event => {
177+
if (event.document.uri.scheme !== 'file') {
178+
return;
179+
}
174180
if (event?.document === window.activeTextEditor?.document) {
175181
this.updateStatus();
176182
}

0 commit comments

Comments
 (0)