commit before reverting

This commit is contained in:
meganrogge
2022-03-14 15:50:40 -04:00
parent ced06629d4
commit 7dc3332b05
4 changed files with 22 additions and 23 deletions
@@ -48,11 +48,14 @@ export class BufferDecorationRenderer extends Disposable implements IDecorationR
}
public renderDecoration(decorationOptions: IDecorationOptions): void {
const decoration = new BufferDecoration(this._bufferService, decorationOptions);
if (this._decorationContainer && decoration.element && !this._decorationContainer.contains(decoration.element)) {
this._decorationContainer.append(decoration.element);
if (decorationOptions.overviewRulerItemColor) {
return;
}
const decoration = new BufferDecoration(this._bufferService, decorationOptions);
(decoration as BufferDecoration).render(this._decorationContainer, this._renderService, true);
if (this._decorationContainer && decoration.element && !this._decorationContainer.contains(decoration.element)) {
this._decorationContainer.append(decoration.element!);
}
}
public override dispose(): void {
@@ -108,6 +111,7 @@ export class BufferDecoration extends Disposable implements IDecoration {
}
this._refreshStyle(renderService);
if (this._element) {
console.log('firing on render');
this._onRender.fire(this._element);
}
}
+7 -7
View File
@@ -586,13 +586,13 @@ export class Terminal extends CoreTerminal implements ITerminal {
if (this._decorationService) {
this._bufferDecorationRenderer = new BufferDecorationRenderer(this._bufferService, this._renderService, this._decorationService, this.screenElement);
}
// if (this.options.overviewRulerWidth && this._decorationService) {
// this._overviewRulerRenderer = new OverviewRulerRenderer(this._bufferService, this._renderService, this._decorationService, this._viewportElement, this.screenElement);
// }
// this.optionsService.onOptionChange(() => {
// if (!this._overviewRulerRenderer && this.options.overviewRulerWidth && this._renderService && this._viewportElement && this.screenElement && this._decorationService) {
// this._overviewRulerRenderer = new OverviewRulerRenderer(this._bufferService, this._renderService, this._decorationService, this._viewportElement, this.screenElement);
// }});
if (this.options.overviewRulerWidth && this._decorationService) {
this._overviewRulerRenderer = new OverviewRulerRenderer(this._bufferService, this._renderService, this._decorationService, this._instantiationService, this._viewportElement, this.screenElement);
}
this.optionsService.onOptionChange(() => {
if (!this._overviewRulerRenderer && this.options.overviewRulerWidth && this._renderService && this._viewportElement && this.screenElement && this._decorationService) {
this._overviewRulerRenderer = new OverviewRulerRenderer(this._bufferService, this._renderService, this._decorationService, this._instantiationService, this._viewportElement, this.screenElement);
}});
// This event listener must be registered aftre MouseZoneManager is created
this.register(addDisposableDomListener(this.element, 'mousedown', (e: MouseEvent) => this._selectionService!.onMouseDown(e)));