From 35be98f95ca999a112ad3aff0932be766f702e13 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 13 Jan 2026 10:35:39 +0100 Subject: [PATCH] fix: Make absolute Plane writing functions update column correctly Writing to an absolute plane position should update the plane's cursor position before incrementing it even if it is not actually used. closes #446 --- src/renderer/vaxis/Plane.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/renderer/vaxis/Plane.zig b/src/renderer/vaxis/Plane.zig index 3bf9dab..ac02778 100644 --- a/src/renderer/vaxis/Plane.zig +++ b/src/renderer/vaxis/Plane.zig @@ -138,6 +138,7 @@ pub fn fill(self: *Plane, egc: []const u8) void { for (0..self.dim_y()) |y| for (0..self.dim_x()) |x| self.write_cell(x, y, egc); + if (self.col > 100000) std.log.debug("column: {}", .{self.col}); } pub fn fill_width(self: *Plane, comptime fmt: anytype, args: anytype) !usize { @@ -261,6 +262,8 @@ fn write_cell(self: *Plane, col: usize, row: usize, egc: []const u8) void { cell.style = self.style; } self.window.writeCell(@intCast(col), @intCast(row), cell); + self.row = @intCast(row); + self.col = @intCast(col); self.col += @intCast(w); }