From 404f66c13cb3c4ef0fb30db8a09b2967fc4b8367 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 6 Apr 2020 12:44:07 +0200 Subject: [PATCH] Fix #90890 --- .../editor/common/services/markerDecorationsServiceImpl.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/common/services/markerDecorationsServiceImpl.ts b/src/vs/editor/common/services/markerDecorationsServiceImpl.ts index 78820460000..f79e864845d 100644 --- a/src/vs/editor/common/services/markerDecorationsServiceImpl.ts +++ b/src/vs/editor/common/services/markerDecorationsServiceImpl.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { IMarkerService, IMarker, MarkerSeverity, MarkerTag } from 'vs/platform/markers/common/markers'; -import { Disposable, toDisposable } from 'vs/base/common/lifecycle'; +import { Disposable, toDisposable, IDisposable } from 'vs/base/common/lifecycle'; import { URI } from 'vs/base/common/uri'; import { IModelDeltaDecoration, ITextModel, IModelDecorationOptions, TrackedRangeStickiness, OverviewRulerLane, IModelDecoration, MinimapPosition, IModelDecorationMinimapOptions } from 'vs/editor/common/model'; import { ClassName } from 'vs/editor/common/model/intervalTree'; @@ -37,6 +37,10 @@ class MarkerDecorations extends Disposable { })); } + register(t: T): T { + return super._register(t); + } + public update(markers: IMarker[], newDecorations: IModelDeltaDecoration[]): void { const oldIds = keys(this._markersData); this._markersData.clear(); @@ -110,6 +114,7 @@ export class MarkerDecorationsService extends Disposable implements IMarkerDecor private _onModelAdded(model: ITextModel): void { const markerDecorations = new MarkerDecorations(model); this._markerDecorations.set(MODEL_ID(model.uri), markerDecorations); + markerDecorations.register(model.onDidChangeContent(() => this._updateDecorations(markerDecorations))); this._updateDecorations(markerDecorations); } -- GitLab