File tree Expand file tree Collapse file tree
src/vs/editor/common/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,13 +41,14 @@ class MarkerDecorations extends Disposable {
4141 return super . _register ( t ) ;
4242 }
4343
44- public update ( markers : IMarker [ ] , newDecorations : IModelDeltaDecoration [ ] ) : void {
44+ public update ( markers : IMarker [ ] , newDecorations : IModelDeltaDecoration [ ] ) : boolean {
4545 const oldIds = keys ( this . _markersData ) ;
4646 this . _markersData . clear ( ) ;
4747 const ids = this . model . deltaDecorations ( oldIds , newDecorations ) ;
4848 for ( let index = 0 ; index < ids . length ; index ++ ) {
4949 this . _markersData . set ( ids [ index ] , markers [ index ] ) ;
5050 }
51+ return oldIds . length !== 0 || ids . length !== 0 ;
5152 }
5253
5354 getMarker ( decoration : IModelDecoration ) : IMarker | undefined {
@@ -144,8 +145,9 @@ export class MarkerDecorationsService extends Disposable implements IMarkerDecor
144145 options : this . _createDecorationOption ( marker )
145146 } ;
146147 } ) ;
147- markerDecorations . update ( markers , newModelDecorations ) ;
148- this . _onDidChangeMarker . fire ( markerDecorations . model ) ;
148+ if ( markerDecorations . update ( markers , newModelDecorations ) ) {
149+ this . _onDidChangeMarker . fire ( markerDecorations . model ) ;
150+ }
149151 }
150152
151153 private _createDecorationRange ( model : ITextModel , rawMarker : IMarker ) : Range {
You can’t perform that action at this time.
0 commit comments