From d900d1c3fdf8c06b2faa5f179cdbf8c241eeaf06 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 29 Feb 2024 16:40:56 +0100 Subject: [PATCH] fix: minor rendering issues caused by notcurses egc overrun --- build.zig.zon | 4 ++-- src/tui/editor.zig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 7191283..490dde1 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -4,8 +4,8 @@ .dependencies = .{ .notcurses = .{ - .url = "https://github.com/neurocyte/notcurses-zig/archive/99dd02c42fc8b276fed0890369c9136316747ab9.tar.gz", - .hash = "1220be39bfc0c45e66f7e99cbddf3836dbe32b1fb36a8b5c616f4b13f97a275d36cf", + .url = "https://github.com/neurocyte/notcurses-zig/archive/2a916e439c3e9352a55a081cc76b88307aab0679.tar.gz", + .hash = "122097dd91bc7145a3008fce887627c196b548e80ab02a0cb443b214c56cfd52b31e", }, .clap = .{ .url = "https://github.com/Hejsil/zig-clap/archive/9c23bcb5aebe0c2542b4de4472f60959974e2222.tar.gz", diff --git a/src/tui/editor.zig b/src/tui/editor.zig index 5cee975..9c464ab 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -829,7 +829,7 @@ pub const Editor = struct { return .{ 1, 9 - (abs_col % 8) }; } - inline fn render_egc(c: *nc.Cell, n: nc.Plane, egc: [*c]const u8) struct { usize, usize } { + inline fn render_egc(c: *nc.Cell, n: nc.Plane, egc: [:0]const u8) struct { usize, usize } { const bytes = n.cell_load(c, egc) catch return .{ 1, 1 }; const colcount = nc.cell_cols(c); return .{ bytes, colcount };