Merge pull request #3688 from meganrogge/onRender

don't fire onRender for overviewRuler decorations
This commit is contained in:
Daniel Imms
2022-03-16 11:47:26 -07:00
committed by GitHub
2 changed files with 1 additions and 6 deletions
+1 -5
View File
@@ -548,11 +548,7 @@ function addDecoration() {
term.options['overviewRulerWidth'] = 15; term.options['overviewRulerWidth'] = 15;
const marker = term.addMarker(1); const marker = term.addMarker(1);
const decoration = term.registerDecoration({ marker, overviewRulerOptions: { color: '#ef2929'} }); const decoration = term.registerDecoration({ marker, overviewRulerOptions: { color: '#ef2929'} });
decoration.onRender((e) => { decoration.onRender((e) => e.style.backgroundColor = '#ef2929');
if (e.classList.value === 'xterm-decoration') {
e.style.backgroundColor = '#ef2929';
}
});
} }
function addOverviewRuler() { function addOverviewRuler() {
@@ -121,7 +121,6 @@ export class OverviewRulerRenderer extends Disposable {
this._decorationElements.set(decoration, this._canvas); this._decorationElements.set(decoration, this._canvas);
} }
this._refreshStyle(decoration, updateAnchor); this._refreshStyle(decoration, updateAnchor);
decoration.onRenderEmitter.fire(this._canvas);
} }
private _queueRefresh(updateCanvasDimensions?: boolean, updateAnchor?: boolean): void { private _queueRefresh(updateCanvasDimensions?: boolean, updateAnchor?: boolean): void {