chor: use new Writer interface for terminal's Writer; fix test cases
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 3m38s

This commit is contained in:
2025-10-01 10:59:29 +02:00
parent aa17e13b99
commit 832fc45c3e
6 changed files with 46 additions and 44 deletions

View File

@@ -88,7 +88,7 @@ pub const Buffered = struct {
try terminal.hideCursor();
// TODO measure timings of rendered frames?
var cursor_position: ?Point = null;
const writer = terminal.writer();
var writer = terminal.writer();
const s = this.screen;
const vs = this.virtual_screen;
for (0..this.size.y) |row| {
@@ -110,7 +110,7 @@ pub const Buffered = struct {
// render differences found in virtual screen
try terminal.setCursorPosition(.{ .y = @truncate(row), .x = @truncate(col) });
try cvs.value(writer);
try cvs.value(&writer);
// update screen to be the virtual screen for the next frame
s[idx] = vs[idx];
}