diff --git a/src/browser/ColorManager.ts b/src/browser/ColorManager.ts index f11ef8fd..d91f6819 100644 --- a/src/browser/ColorManager.ts +++ b/src/browser/ColorManager.ts @@ -111,9 +111,14 @@ export class ColorManager implements IColorManager { this._updateRestoreColors(); } - public onOptionsChange(key: string): void { - if (key === 'minimumContrastRatio') { - this._contrastCache.clear(); + public onOptionsChange(key: string, value: any): void { + switch (key) { + case 'minimumContrastRatio': + this._contrastCache.clear(); + break; + case 'allowTransparency': + this.allowTransparency = value; + break; } } diff --git a/src/browser/Terminal.ts b/src/browser/Terminal.ts index 83b66013..bd82325d 100644 --- a/src/browser/Terminal.ts +++ b/src/browser/Terminal.ts @@ -517,7 +517,7 @@ export class Terminal extends CoreTerminal implements ITerminal { this._theme = this.options.theme || this._theme; this._colorManager = new ColorManager(document, this.options.allowTransparency); - this.register(this.optionsService.onOptionChange(e => this._colorManager!.onOptionsChange(e))); + this.register(this.optionsService.onOptionChange(e => this._colorManager!.onOptionsChange(e, this.optionsService.rawOptions[e]))); this._colorManager.setTheme(this._theme); this._characterJoinerService = this._instantiationService.createInstance(CharacterJoinerService); diff --git a/src/browser/Types.d.ts b/src/browser/Types.d.ts index 4e203ab7..41992a8b 100644 --- a/src/browser/Types.d.ts +++ b/src/browser/Types.d.ts @@ -110,7 +110,7 @@ export interface IBrowser { export interface IColorManager { colors: IColorSet; - onOptionsChange(key: string): void; + onOptionsChange(key: string, value: any): void; } export interface IColorSet {