simplify options
This commit is contained in:
@@ -7,7 +7,6 @@ import { IOptionsService, ITerminalOptions, IPartialTerminalOptions } from 'comm
|
||||
import { EventEmitter, IEvent } from 'common/EventEmitter';
|
||||
import { isMac } from 'common/Platform';
|
||||
import { clone } from 'common/Clone';
|
||||
import { setWindowOptions, getWindowOptions, WindowOptions } from 'common/WindowOptions';
|
||||
|
||||
// Source: https://freesound.org/people/altemark/sounds/45759/
|
||||
// This sound is released under the Creative Commons Attribution 3.0 Unported
|
||||
@@ -65,7 +64,6 @@ export class OptionsService implements IOptionsService {
|
||||
serviceBrand: any;
|
||||
|
||||
public options: ITerminalOptions;
|
||||
public windowOptions: WindowOptions = 0;
|
||||
|
||||
private _onOptionChange = new EventEmitter<string>();
|
||||
public get onOptionChange(): IEvent<string> { return this._onOptionChange.event; }
|
||||
@@ -78,9 +76,6 @@ export class OptionsService implements IOptionsService {
|
||||
this.options[k] = newValue;
|
||||
}
|
||||
});
|
||||
if (options.windowOptions) {
|
||||
this.windowOptions = setWindowOptions(options.windowOptions as any, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public setOption(key: string, value: any): void {
|
||||
@@ -135,8 +130,6 @@ export class OptionsService implements IOptionsService {
|
||||
throw new Error(`${key} cannot be less than or equal to 0, value: ${value}`);
|
||||
}
|
||||
break;
|
||||
case 'windowOptions':
|
||||
this.windowOptions = setWindowOptions(value, this.windowOptions);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
@@ -145,9 +138,6 @@ export class OptionsService implements IOptionsService {
|
||||
if (!(key in DEFAULT_OPTIONS)) {
|
||||
throw new Error(`No option with key "${key}"`);
|
||||
}
|
||||
if (key === 'windowOptions') {
|
||||
return getWindowOptions(this.windowOptions);
|
||||
}
|
||||
return this.options[key];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import { IEvent } from 'common/EventEmitter';
|
||||
import { IBuffer, IBufferSet } from 'common/buffer/Types';
|
||||
import { IDecPrivateModes, ICoreMouseEvent, CoreMouseEncoding, ICoreMouseProtocol, CoreMouseEventType, IWindowOptions } from 'common/Types';
|
||||
import { createDecorator } from 'common/services/ServiceRegistry';
|
||||
import { WindowOptions } from 'common/WindowOptions';
|
||||
|
||||
export const IBufferService = createDecorator<IBufferService>('BufferService');
|
||||
export interface IBufferService {
|
||||
@@ -167,7 +166,6 @@ export interface IOptionsService {
|
||||
serviceBrand: any;
|
||||
|
||||
readonly options: ITerminalOptions;
|
||||
readonly windowOptions: WindowOptions;
|
||||
|
||||
readonly onOptionChange: IEvent<string>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user