mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 21:06:57 +00:00
Fix #90890
This commit is contained in:
parent
62f24d7f75
commit
404f66c13c
1 changed files with 6 additions and 1 deletions
|
@ -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 extends IDisposable>(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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue