From c94b6c9b57bed03854ce2a958cfd520424512057 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Fri, 26 Jun 2026 11:53:04 +0000 Subject: [PATCH] docs: document ITerminalOptions scrollback default Change-Id: I7277e34e9d74f8308e9942b46a755ce375e8c552 Signed-off-by: Thomas Kosiewski --- lib/interfaces.ts | 2 +- lib/terminal.test.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/interfaces.ts b/lib/interfaces.ts index 5b2017d5..4c6fbe43 100644 --- a/lib/interfaces.ts +++ b/lib/interfaces.ts @@ -10,7 +10,7 @@ export interface ITerminalOptions { cursorBlink?: boolean; // Default: false cursorStyle?: 'block' | 'underline' | 'bar'; theme?: ITheme; - scrollback?: number; // Default: 1000 + scrollback?: number; // Default: 10000 fontSize?: number; // Default: 15 fontFamily?: string; // Default: 'monospace' allowTransparency?: boolean; diff --git a/lib/terminal.test.ts b/lib/terminal.test.ts index d56011ec..5cd44749 100644 --- a/lib/terminal.test.ts +++ b/lib/terminal.test.ts @@ -2332,6 +2332,18 @@ describe('Public Mutable Options', () => { expect(term.options.scrollback).toBe(5000); }); + test('options expose default values when none are provided', async () => { + const term = await createIsolatedTerminal(); + try { + expect(term.options).toBeDefined(); + expect(term.options.cols).toBe(80); + expect(term.options.rows).toBe(24); + expect(term.options.scrollback).toBe(10000); + } finally { + term.dispose(); + } + }); + test('options can be mutated at runtime', async () => { const term = await createIsolatedTerminal(); expect(term.options.disableStdin).toBe(false);