Skip to content

Commit 28f838b

Browse files
authored
Merge pull request microsoft#95653 from jeanp413/fix-95461
Update markersViewModel on MarkersView construction
2 parents 903f62f + 65eeb26 commit 28f838b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/vs/workbench/contrib/markers/browser/markersView.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,16 @@ export class MarkersView extends ViewPane implements IMarkerFilterController {
114114
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
115115
this.smallLayoutContextKey = Constants.MarkersViewSmallLayoutContextKey.bindTo(this.contextKeyService);
116116
this.panelState = new Memento(Constants.MARKERS_VIEW_STORAGE_ID, storageService).getMemento(StorageScope.WORKSPACE);
117+
117118
this.markersViewModel = this._register(instantiationService.createInstance(MarkersViewModel, this.panelState['multiline']));
119+
const resourceMarkers = this.markersWorkbenchService.markersModel.resourceMarkers;
120+
for (const resourceMarker of resourceMarkers) {
121+
for (const marker of resourceMarker.markers) {
122+
this.markersViewModel.add(marker);
123+
}
124+
}
118125
this._register(this.markersViewModel.onDidChange(marker => this.onDidChangeViewState(marker)));
126+
119127
this.setCurrentActiveEditor();
120128

121129
this.filter = new Filter(new FilterOptions());

0 commit comments

Comments
 (0)