terminal: limit scrollback by physical lines

This commit is contained in:
Mitchell Hashimoto
2026-07-26 15:59:16 -07:00
parent 32e76d8ed0
commit 5b2d3b7df1
2 changed files with 670 additions and 332 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -293,12 +293,11 @@ pub fn init(
opts: Options,
) Allocator.Error!Screen {
// Initialize our backing pages.
var pages = try PageList.init(
alloc,
opts.cols,
opts.rows,
opts.max_scrollback,
);
var pages = try PageList.init(alloc, .{
.cols = opts.cols,
.rows = opts.rows,
.max_size = opts.max_scrollback,
});
errdefer pages.deinit();
// Create our tracked pin for the cursor.