summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 19:26:28 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit156891c9346ee15aea5e10edbc80850f0cf36797 (patch)
tree4872d8f9906058d02bc76e11b900a4f242175ecf /build.zig
parente29faca73e07eb90aa0c8f6f33e55c8ace77a3c4 (diff)
downloadpardes-156891c9346ee15aea5e10edbc80850f0cf36797.tar.gz
pardes-156891c9346ee15aea5e10edbc80850f0cf36797.zip
vaxis sends a frame with nothing changed as nothing: its secondary-cursor test read equal as changed
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig6
1 files changed, 6 insertions, 0 deletions
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,