Set bellStyle to a string type instead of an array of strings

This commit is contained in:
npezza93
2017-08-17 19:44:37 -04:00
parent 8a6bff42c9
commit 68cd79db34
2 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ export interface IInputHandlingTerminal extends IEventEmitter {
export interface ITerminalOptions {
bellSound?: string;
bellStyle?: string[];
bellStyle?: string;
cancelEvents?: boolean;
colors?: string[];
cols?: number;
+2 -6
View File
@@ -2284,15 +2284,11 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
}
private visualBell(): boolean {
let styles = [].concat.apply([], [this.options.bellStyle]);
return styles.indexOf('visual') > -1 || styles.indexOf('both') > -1;
return this.options.bellStyle == 'visual' || this.options.bellStyle == 'both';
}
private soundBell(): boolean {
let styles = [].concat.apply([], [this.options.bellStyle]);
return styles.indexOf('sound') > -1 || styles.indexOf('both') > -1;
return this.options.bellStyle == 'sound' || this.options.bellStyle == 'both';
}
private preloadBellSound(): void {