From 156891c9346ee15aea5e10edbc80850f0cf36797 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 19:26:28 -0300 Subject: vaxis sends a frame with nothing changed as nothing: its secondary-cursor test read equal as changed --- build.zig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'build.zig') diff --git a/build.zig b/build.zig index 2419dd59..8b7cb3b2 100644 --- a/build.zig +++ b/build.zig @@ -881,6 +881,12 @@ pub fn build(b: *std.Build) void { \\ (last.eql(cell) or blankInkOnly(&last, &cell)) and // pardes's patch (its build.zig) \\ ) catch @panic("OOM"); + // And the secondary cursors count as changed when they differ, not + // when they are the same: read the other way round, every render + // started a frame, ~40 bytes to the terminal with nothing changed. + const secondary_anchor = " std.meta.eql(self.screen.cursor_secondary, self.state.cursor_secondary);\n"; + if (std.mem.count(u8, render_src, secondary_anchor) != 1) std.debug.panic("vaxis's Vaxis.zig changed at `{s}`: redo its patch in build.zig", .{secondary_anchor}); + render_src = std.mem.replaceOwned(u8, b.allocator, render_src, secondary_anchor, " !std.meta.eql(self.screen.cursor_secondary, self.state.cursor_secondary); // pardes's patch (its build.zig)\n") catch @panic("OOM"); const blank_ink = \\ \\/// pardes's patch (its build.zig): a blank cell (a space, no underline, -- cgit v1.3