Implement blink rendering

Fixes #944
This commit is contained in:
Daniel Imms
2026-02-03 03:46:21 -08:00
parent 8f9045ed88
commit 8a00898533
9 changed files with 176 additions and 42 deletions
+7
View File
@@ -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
+1
View File
@@ -229,6 +229,7 @@ export interface ITerminalOptions {
cols?: number;
convertEol?: boolean;
cursorBlink?: boolean;
blinkIntervalDuration?: number;
cursorStyle?: CursorStyle;
cursorWidth?: number;
cursorInactiveStyle?: CursorInactiveStyle;