summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
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,