Skip to content

Introduce scrollback-limit-lines to limit scrollback by lines instead of bytes - #13473

Merged
mitchellh merged 6 commits into
mainfrom
max-lines
Jul 27, 2026
Merged

mitchellh merged 6 commits into
mainfrom
max-lines

Conversation

@mitchellh

Copy link
Copy Markdown
Contributor

This adds a new config scrollback-limit-lines to limit scrollback by lines instead of bytes. This also renames scrollback-limit to scrollback-limit-bytes to make it clear what it does but we have a compatibility entry so old configurations will continue to work, so its not breaking.

This is NOT exclusive to scrollback-limit-bytes. When both are set, then the first limit reached is used. Since lines is affected by viewport size and bytes are affected by entries (more styles, more graphemes, etc.), they serve somewhat different purposes and it might be useful to set both.

The default remains 50MB of bytes, unlimited lines.

This is not exposed to libghostty yet. I have that coming as a follow up change.

@mitchellh

Copy link
Copy Markdown
Contributor Author

I also ran our ghostty-bench on +terminal-stream and there was no regressions from a baseline. All good.

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