terminal: appendGrapheme should text for codepoint, not text

This commit is contained in:
Mitchell Hashimoto
2024-07-26 12:24:35 -07:00
parent a5d39103c9
commit 6668930b96
2 changed files with 1 additions and 2 deletions

View File

@ -1816,7 +1816,6 @@ fn prepKittyVirtualPlacement(
if (rows <= row_off) return;
rows -= row_off;
}
if (src_x + src_w > img_width_f64) {
const redundant_px = src_x + src_w - img_width_f64;
const redundant_cells = @as(u32, @intFromFloat(redundant_px * x_scale)) / self.grid_metrics.cell_width;

View File

@ -1152,7 +1152,7 @@ pub const Page = struct {
pub fn setGraphemes(self: *Page, row: *Row, cell: *Cell, cps: []u21) Allocator.Error!void {
defer self.assertIntegrity();
assert(cell.hasText());
assert(cell.codepoint() > 0);
assert(cell.content_tag == .codepoint);
const cell_offset = getOffset(Cell, self.memory, cell);