mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
preeditCallback(self): remove fast path codepoint width
This commit is contained in:
@ -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: usize = if (cp <= 0xFF) 1 else @intCast(unicode.table.get(cp).width);
|
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.
|
||||||
|
Reference in New Issue
Block a user