Store theme in right place

This commit is contained in:
Daniel Imms
2018-07-29 14:25:55 -07:00
parent 804cb36adc
commit 4a3c1a4cc6
+1 -1
View File
@@ -696,6 +696,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
this.element.appendChild(fragment);
this._setupRenderer();
this._theme = this.options.theme;
this.options.theme = null;
this.viewport = new Viewport(this, this._viewportElement, this._viewportScrollArea, this.charMeasure);
this.viewport.onThemeChanged(this.renderer.colorManager.colors);
@@ -758,7 +759,6 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
case 'dom': this.renderer = new DomRenderer(this, this.options.theme); break;
default: throw new Error(`Unrecognized rendererType "${this.options.rendererType}"`);
}
this._theme = this.options.theme;
this.register(this.renderer);
}