mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
window charCallback accepts doesn't assume ASCII, accepts any Unicode CP
This commit is contained in:
@ -741,11 +741,11 @@ pub fn charCallback(self: *Window, codepoint: u21) !void {
|
|||||||
|
|
||||||
// Ask our IO thread to write the data
|
// Ask our IO thread to write the data
|
||||||
var data: termio.Message.WriteReq.Small.Array = undefined;
|
var data: termio.Message.WriteReq.Small.Array = undefined;
|
||||||
data[0] = @intCast(u8, codepoint);
|
const len = try std.unicode.utf8Encode(codepoint, &data);
|
||||||
_ = self.io_thread.mailbox.push(.{
|
_ = self.io_thread.mailbox.push(.{
|
||||||
.write_small = .{
|
.write_small = .{
|
||||||
.data = data,
|
.data = data,
|
||||||
.len = 1,
|
.len = len,
|
||||||
},
|
},
|
||||||
}, .{ .forever = {} });
|
}, .{ .forever = {} });
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user