Set bellStyle to a string type instead of an array of strings
This commit is contained in:
+1
-1
@@ -115,7 +115,7 @@ export interface IInputHandlingTerminal extends IEventEmitter {
|
|||||||
|
|
||||||
export interface ITerminalOptions {
|
export interface ITerminalOptions {
|
||||||
bellSound?: string;
|
bellSound?: string;
|
||||||
bellStyle?: string[];
|
bellStyle?: string;
|
||||||
cancelEvents?: boolean;
|
cancelEvents?: boolean;
|
||||||
colors?: string[];
|
colors?: string[];
|
||||||
cols?: number;
|
cols?: number;
|
||||||
|
|||||||
+2
-6
@@ -2284,15 +2284,11 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
|||||||
}
|
}
|
||||||
|
|
||||||
private visualBell(): boolean {
|
private visualBell(): boolean {
|
||||||
let styles = [].concat.apply([], [this.options.bellStyle]);
|
return this.options.bellStyle == 'visual' || this.options.bellStyle == 'both';
|
||||||
|
|
||||||
return styles.indexOf('visual') > -1 || styles.indexOf('both') > -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private soundBell(): boolean {
|
private soundBell(): boolean {
|
||||||
let styles = [].concat.apply([], [this.options.bellStyle]);
|
return this.options.bellStyle == 'sound' || this.options.bellStyle == 'both';
|
||||||
|
|
||||||
return styles.indexOf('sound') > -1 || styles.indexOf('both') > -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private preloadBellSound(): void {
|
private preloadBellSound(): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user