@@ -14,6 +14,7 @@ export const DEFAULT_OPTIONS: Readonly<Required<ITerminalOptions>> = {
|
||||
rows: 24,
|
||||
showCursorImmediately: false,
|
||||
cursorBlink: false,
|
||||
blinkIntervalDuration: 0,
|
||||
cursorStyle: 'block',
|
||||
cursorWidth: 1,
|
||||
cursorInactiveStyle: 'outline',
|
||||
@@ -168,6 +169,12 @@ export class OptionsService extends Disposable implements IOptionsService {
|
||||
}
|
||||
value = FONT_WEIGHT_OPTIONS.includes(value) ? value : DEFAULT_OPTIONS[key];
|
||||
break;
|
||||
case 'blinkIntervalDuration':
|
||||
value = Math.floor(value);
|
||||
if (value < 0) {
|
||||
throw new Error(`${key} cannot be less than 0, value: ${value}`);
|
||||
}
|
||||
break;
|
||||
case 'cursorWidth':
|
||||
value = Math.floor(value);
|
||||
// Fall through for bounds check
|
||||
|
||||
@@ -229,6 +229,7 @@ export interface ITerminalOptions {
|
||||
cols?: number;
|
||||
convertEol?: boolean;
|
||||
cursorBlink?: boolean;
|
||||
blinkIntervalDuration?: number;
|
||||
cursorStyle?: CursorStyle;
|
||||
cursorWidth?: number;
|
||||
cursorInactiveStyle?: CursorInactiveStyle;
|
||||
|
||||
Reference in New Issue
Block a user