Skip to content

docs: correct GhosttyTerminalConfig.scrollbackLimit docs#151

Open
sauyon wants to merge 1 commit intocoder:mainfrom
sauyon:fix-scrollback-limit-unit
Open

docs: correct GhosttyTerminalConfig.scrollbackLimit docs#151
sauyon wants to merge 1 commit intocoder:mainfrom
sauyon:fix-scrollback-limit-unit

Conversation

@sauyon
Copy link
Copy Markdown

@sauyon sauyon commented Apr 7, 2026

scrollback_limit is passed to ghostty's Terminal.max_scrollback, which is in bytes. The low-level config types described it as "number of scrollback lines", which is misleading — a caller passing 10,000 expecting lines gets 10,000 bytes and falls below the 2-page PageList floor.

Only the low-level GhosttyTerminalConfig / TerminalConfig docs are corrected here. The xterm.js-compat ITerminalOptions.scrollback field still inherits xterm.js-compat framing and a misleadingly xterm.js- shaped default (1000) despite plumbing directly to a bytes-valued field; fixing that properly requires a lines-to-bytes conversion somewhere. Happy to contribute this if required.

scrollback_limit is passed to ghostty's Terminal.max_scrollback, which
is in bytes. The low-level config types described it as "number of
scrollback lines", which is misleading — a caller passing 10,000
expecting lines gets 10,000 bytes and falls below the 2-page PageList
floor.

Only the low-level GhosttyTerminalConfig / TerminalConfig docs are
corrected here. The xterm.js-compat ITerminalOptions.scrollback field
still inherits xterm.js-compat framing and a misleadingly xterm.js-
shaped default (1000) despite plumbing directly to a bytes-valued
field; fixing that properly requires a lines-to-bytes conversion in
buildWasmConfig, which belongs in a separate change.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant