diff --git a/src/terminal/Terminal.zig b/src/terminal/Terminal.zig index 16b8a07b9..013325c3a 100644 --- a/src/terminal/Terminal.zig +++ b/src/terminal/Terminal.zig @@ -281,7 +281,7 @@ pub fn print(self: *Terminal, c: u21) !void { // column. Otherwise, we need to check if there is text to // figure out if we're attaching to the prev or current. if (self.screen.cursor.x != right_limit - 1) break :left 1; - break :left @intFromBool(!self.screen.cursor.page_cell.hasText()); + break :left @intFromBool(self.screen.cursor.page_cell.codepoint() == 0); }; // If the previous cell is a wide spacer tail, then we actually @@ -299,7 +299,7 @@ pub fn print(self: *Terminal, c: u21) !void { // If our cell has no content, then this is a new cell and // necessarily a grapheme break. - if (!prev.cell.hasText()) break :grapheme; + if (prev.cell.codepoint() == 0) break :grapheme; const grapheme_break = brk: { var state: unicode.GraphemeBreakState = .{}; diff --git a/src/terminal/page.zig b/src/terminal/page.zig index 0ad599641..396e976be 100644 --- a/src/terminal/page.zig +++ b/src/terminal/page.zig @@ -1161,7 +1161,7 @@ pub const Page = struct { pub fn appendGrapheme(self: *Page, row: *Row, cell: *Cell, cp: u21) Allocator.Error!void { defer self.assertIntegrity(); - if (comptime std.debug.runtime_safety) assert(cell.hasText()); + if (comptime std.debug.runtime_safety) assert(cell.codepoint() != 0); const cell_offset = getOffset(Cell, self.memory, cell); var map = self.grapheme_map.map(self.memory);