Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/vs/workbench/api/browser/mainThreadDiagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,8 @@ export class MainThreadDiagnostics implements MainThreadDiagnosticsShape {
const data: [UriComponents, IMarkerData[]][] = [];
for (const resource of resources) {
const allMarkerData = this._markerService.read({ resource, ignoreResourceFilters: true });
if (allMarkerData.length === 0) {
data.push([resource, []]);
} else {
const foreignMarkerData = allMarkerData.filter(marker => marker?.origin !== this.extHostId);
if (foreignMarkerData.length > 0) {
data.push([resource, foreignMarkerData]);
}
}
const markerData = allMarkerData.filter(marker => marker.origin !== this.extHostId);
data.push([resource, markerData]);
}
if (data.length > 0) {
this._proxy.$acceptMarkersChange(data);
Expand Down
6 changes: 5 additions & 1 deletion src/vs/workbench/api/common/extHostDiagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,11 @@ export class ExtHostDiagnostics implements ExtHostDiagnosticsShape {
}

for (const [uri, markers] of data) {
this._mirrorCollection.set(URI.revive(uri), markers.map(converter.Diagnostic.to));
if (markers.length === 0) {
this._mirrorCollection.delete(URI.revive(uri));
} else {
this._mirrorCollection.set(URI.revive(uri), markers.map(converter.Diagnostic.to));
}
}
}
}
Loading