From ee5be265117db90d6e4d883164ac64bf4db66d40 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 22 Mar 2024 10:40:34 -0700 Subject: [PATCH] terminal: prevent false positive integrity check --- src/terminal/page.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/terminal/page.zig b/src/terminal/page.zig index e26f82388..04e183900 100644 --- a/src/terminal/page.zig +++ b/src/terminal/page.zig @@ -412,6 +412,9 @@ pub const Page = struct { for (cells, other_cells) |*dst_cell, *src_cell| { dst_cell.* = src_cell.*; if (src_cell.hasGrapheme()) { + // To prevent integrity checks flipping + if (comptime std.debug.runtime_safety) dst_cell.style_id = style.default_id; + dst_cell.content_tag = .codepoint; // required for appendGrapheme const cps = other.lookupGrapheme(src_cell).?; for (cps) |cp| try self.appendGrapheme(dst_row, dst_cell, cp);