The scrollback-limit setting doesn't take effect no matter how small I set its value
#9982
Issue DescriptionI can't limit the number of lines I can scroll-back to no matter how small I set the value of the Expected BehaviorScroll-back is limited to the set value. Actual BehaviorScroll-back isn't limiter no matter how small I set its value. Reproduction Steps
Ghostty LogsNo response Ghostty VersionOS Version InformationCachyOS (Linux only) Display ServerWayland (Linux only) Desktop Environment/Window ManagerKDE Plasma 6.5.4 Minimal Ghostty Configurationscrollback-limit = 8Additional Relevant ConfigurationNo response I acknowledge that:
|
Replies: 2 comments 8 replies
|
This is an implementation artifact. The actual scrollback won't ever be exactly zero, because Ghostty needs some extra working memory in addition to the current viewport, and for performance, the size of this workspace is rounded up to align with hardware memory page boundaries. Ghostty will let you scroll the contents of this workspace, because hiding parts of it from you to exactly match what you see with your There's some brief explanation/discussion in various comments around the codebase, such as here: ghostty/src/terminal/PageList.zig Lines 216 to 219 in 73a93ab
So, in short, if you set |
|
I have the same issue here. No matter how I set it up, absolutely no change, and that's a deal breaker which forces to move away from Ghostty. Any idea on the cause? |
Ah, you're right, there is indeed a special case for this:
ghostty/src/terminal/Screen.zig
Line 262 in df8dde9
Do note that this doesn't actually save you any memory compared to
scrollback_limit = 1. It just disables scrolling. The minimum amount of page list memory is still allocated.As I've explained above, it does limit the scrollback to the minimum possible size. It's just that the minimum is significantly larger than 1 by…