core: configurable scrollback limit

This commit is contained in:
Mitchell Hashimoto
2024-03-11 21:02:28 -07:00
parent 03abde6ba8
commit 49e8acbcd2
6 changed files with 317 additions and 289 deletions

View File

@@ -63,7 +63,7 @@ pub fn cursorStyle(
test "cursor: default uses configured style" {
const testing = std.testing;
const alloc = testing.allocator;
var term = try terminal.Terminal.init(alloc, 10, 10);
var term = try terminal.Terminal.init(alloc, .{ .cols = 10, .rows = 10 });
defer term.deinit(alloc);
term.screen.cursor.cursor_style = .bar;
@@ -84,7 +84,7 @@ test "cursor: default uses configured style" {
test "cursor: blinking disabled" {
const testing = std.testing;
const alloc = testing.allocator;
var term = try terminal.Terminal.init(alloc, 10, 10);
var term = try terminal.Terminal.init(alloc, .{ .cols = 10, .rows = 10 });
defer term.deinit(alloc);
term.screen.cursor.cursor_style = .bar;
@@ -105,7 +105,7 @@ test "cursor: blinking disabled" {
test "cursor: explictly not visible" {
const testing = std.testing;
const alloc = testing.allocator;
var term = try terminal.Terminal.init(alloc, 10, 10);
var term = try terminal.Terminal.init(alloc, .{ .cols = 10, .rows = 10 });
defer term.deinit(alloc);
term.screen.cursor.cursor_style = .bar;
@@ -127,7 +127,7 @@ test "cursor: explictly not visible" {
test "cursor: always block with preedit" {
const testing = std.testing;
const alloc = testing.allocator;
var term = try terminal.Terminal.init(alloc, 10, 10);
var term = try terminal.Terminal.init(alloc, .{ .cols = 10, .rows = 10 });
defer term.deinit(alloc);
var state: State = .{