fix: minor rendering issues caused by notcurses egc overrun

This commit is contained in:
CJ van den Berg 2024-02-29 16:40:56 +01:00
parent d4afabc844
commit d900d1c3fd
2 changed files with 3 additions and 3 deletions

View file

@ -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",

View file

@ -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 };