From 206e23a603f1ed24da1cc734ea8fb63de81be97d Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Mon, 6 Jan 2025 16:15:59 +0100 Subject: [PATCH] fix: crash on rendering zero width chars --- src/tui/editor.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tui/editor.zig b/src/tui/editor.zig index efdc5ce..a0cb8c2 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -821,6 +821,10 @@ pub const Editor = struct { 9 => ctx.self.render_tab(c, n, ctx.buf_col), else => render_egc(c, n, chunk), }; + if (colcount == 0) { + chunk = chunk[bytes..]; + continue; + } var cell_map_val: CellType = switch (chunk[0]) { 32 => .space, 9 => .tab,