Skip to content

docs: correct GhosttyTerminalConfig.scrollbackLimit docs#151

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

docs: correct GhosttyTerminalConfig.scrollbackLimit docs#151
sauyon wants to merge 1 commit into
coder: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>
diegosouzapw added a commit to diegosouzapw/ghostty-web that referenced this pull request May 23, 2026
scrollback_limit is passed to Ghostty's Terminal.max_scrollback, which is
in bytes. The low-level GhosttyTerminalConfig / TerminalConfig docs
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 docstrings 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 and a separate PR.


Inspired-by: coder#151

Co-authored-by: Sauyon Lee <git@sjle.co>
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