Add onMultipleOptionChange

This commit is contained in:
Daniel Imms
2022-10-09 08:14:56 -07:00
parent 49a0904857
commit 7eead44048
5 changed files with 62 additions and 0 deletions
+9
View File
@@ -91,6 +91,15 @@ export class OptionsService extends Disposable implements IOptionsService {
});
}
// eslint-disable-next-line @typescript-eslint/naming-convention
public onMultipleOptionChange(keys: (keyof ITerminalOptions)[], listener: () => any): IDisposable {
return this.onOptionChange(eventKey => {
if (keys.indexOf(eventKey) !== -1) {
listener();
}
});
}
private _setupOptions(): void {
const getter = (propName: string): any => {
if (!(propName in DEFAULT_OPTIONS)) {