get rid of some unnecessary code

This commit is contained in:
meganrogge
2022-02-11 14:08:46 -06:00
parent 71bfbe434b
commit 06357b1184
+1 -3
View File
@@ -17,7 +17,6 @@ export class DecorationService extends Disposable implements IDecorationService
private _renderService: IRenderService | undefined; private _renderService: IRenderService | undefined;
constructor( constructor(
@IBufferService private readonly _bufferService: IBufferService,
@IInstantiationService private readonly _instantiationService: IInstantiationService) { @IInstantiationService private readonly _instantiationService: IInstantiationService) {
super(); super();
} }
@@ -28,7 +27,6 @@ export class DecorationService extends Disposable implements IDecorationService
this._container = document.createElement('div'); this._container = document.createElement('div');
this._container.classList.add('xterm-decoration-container'); this._container.classList.add('xterm-decoration-container');
screenElement.appendChild(this._container); screenElement.appendChild(this._container);
this.refresh();
this.register(this._renderService.onRenderedBufferChange(() => this.refresh())); this.register(this._renderService.onRenderedBufferChange(() => this.refresh()));
this.register(this._renderService.onDimensionsChange(() => this.refresh(true))); this.register(this._renderService.onDimensionsChange(() => this.refresh(true)));
} }
@@ -44,7 +42,7 @@ export class DecorationService extends Disposable implements IDecorationService
} }
public refresh(recreate?: boolean): void { public refresh(recreate?: boolean): void {
if (!this._bufferService || !this._renderService) { if (!this._renderService) {
return; return;
} }
for (const decoration of this._decorations) { for (const decoration of this._decorations) {