mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-22 03:36:14 +03:00
Merge pull request #1488 from erf/replace-ziglyph
Replace ziglyph.codePointWidth with unicode.table.get(cp).width
This commit is contained in:
@ -21,7 +21,7 @@ const assert = std.debug.assert;
|
|||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const ArenaAllocator = std.heap.ArenaAllocator;
|
const ArenaAllocator = std.heap.ArenaAllocator;
|
||||||
const oni = @import("oniguruma");
|
const oni = @import("oniguruma");
|
||||||
const ziglyph = @import("ziglyph");
|
const unicode = @import("unicode/main.zig");
|
||||||
const main = @import("main.zig");
|
const main = @import("main.zig");
|
||||||
const renderer = @import("renderer.zig");
|
const renderer = @import("renderer.zig");
|
||||||
const termio = @import("termio.zig");
|
const termio = @import("termio.zig");
|
||||||
@ -1231,7 +1231,7 @@ pub fn preeditCallback(self: *Surface, preedit_: ?[]const u8) !void {
|
|||||||
var codepoints: std.ArrayListUnmanaged(Codepoint) = .{};
|
var codepoints: std.ArrayListUnmanaged(Codepoint) = .{};
|
||||||
defer codepoints.deinit(self.alloc);
|
defer codepoints.deinit(self.alloc);
|
||||||
while (it.nextCodepoint()) |cp| {
|
while (it.nextCodepoint()) |cp| {
|
||||||
const width = ziglyph.display_width.codePointWidth(cp, .half);
|
const width: usize = @intCast(unicode.table.get(cp).width);
|
||||||
|
|
||||||
// I've never seen a preedit text with a zero-width character. In
|
// I've never seen a preedit text with a zero-width character. In
|
||||||
// theory its possible but we can't really handle it right now.
|
// theory its possible but we can't really handle it right now.
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
//! help, docs, website, etc.
|
//! help, docs, website, etc.
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const ziglyph = @import("ziglyph");
|
|
||||||
const Config = @import("config/Config.zig");
|
const Config = @import("config/Config.zig");
|
||||||
const Action = @import("cli/action.zig").Action;
|
const Action = @import("cli/action.zig").Action;
|
||||||
const KeybindAction = @import("input/Binding.zig").Action;
|
const KeybindAction = @import("input/Binding.zig").Action;
|
||||||
|
Reference in New Issue
Block a user