diff options
Diffstat (limited to 'src/surface.zig')
| -rw-r--r-- | src/surface.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/surface.zig b/src/surface.zig index 46b6c664..a5dbea8e 100644 --- a/src/surface.zig +++ b/src/surface.zig @@ -4,6 +4,7 @@ const pardes = @import("pardes.zig"); const std = @import("std"); const layout = @import("layout.zig"); const uucode = @import("uucode"); +const vaxis = @import("vaxis"); const panes = @import("panes.zig"); const config = @import("config.zig"); const MAX_PANES = pardes.MAX_PANES; @@ -424,7 +425,7 @@ pub const Surface = struct { const width: u16 = if (decoded == null or (cp < 0x80 and cp_slice.len == 1)) 1 else - @max(1, panes.File.utf8Width(cp_slice)); + @max(1, vaxis.gwidth.gwidth(cp_slice, .unicode)); if (width == 2 and col + 1 >= end) return null; var shown = cp_slice; if (shown.len > @typeInfo(@FieldType(Cell, "text")).array.len) { |
