get demo to work the right way

This commit is contained in:
meganrogge
2022-03-15 10:31:01 -04:00
parent 079bbc8242
commit 3e47c96445
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -553,6 +553,7 @@ function addDecoration() {
}
function addOverviewRuler() {
term.options['overviewRulerWidth'] = 15;
const canvas = term.registerDecoration({marker: term.addMarker(1), overviewRulerItemColor: 'red'});
term.registerDecoration({marker: term.addMarker(3), overviewRulerItemColor: 'green'});
term.registerDecoration({marker: term.addMarker(5), overviewRulerItemColor: 'blue'});
+3 -3
View File
@@ -604,9 +604,9 @@ export class Terminal extends CoreTerminal implements ITerminal {
this._accessibilityManager = new AccessibilityManager(this, this._renderService);
}
// if (this.options.overviewRulerWidth) {
this._overviewRulerRenderer = this._instantiationService.createInstance(OverviewRulerRenderer, this._viewportElement, this.screenElement);
// }
if (this.options.overviewRulerWidth) {
this._overviewRulerRenderer = this._instantiationService.createInstance(OverviewRulerRenderer, this._viewportElement, this.screenElement);
}
this.optionsService.onOptionChange(() => {
if (!this._overviewRulerRenderer && this.options.overviewRulerWidth && this._viewportElement && this.screenElement) {
this._overviewRulerRenderer = this._instantiationService.createInstance(OverviewRulerRenderer, this._viewportElement, this.screenElement);