aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/input/key.zig
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/input/key.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/input/key.zig')
-rw-r--r--vendor/libghostty-vt/src/input/key.zig10
1 files changed, 4 insertions, 6 deletions
diff --git a/vendor/libghostty-vt/src/input/key.zig b/vendor/libghostty-vt/src/input/key.zig
index 9c04f01e..1bf64919 100644
--- a/vendor/libghostty-vt/src/input/key.zig
+++ b/vendor/libghostty-vt/src/input/key.zig
@@ -352,8 +352,7 @@ pub const Key = enum(c_int) {
)) |key| return key;
// We need to convert FooBar to foo_bar
- var fbs = std.io.fixedBufferStream(&result);
- const w = fbs.writer();
+ var w: std.Io.Writer = .fixed(&result);
for (code, 0..) |ch, i| switch (ch) {
'a'...'z' => w.writeByte(ch) catch return null,
@@ -367,7 +366,7 @@ pub const Key = enum(c_int) {
else => return null,
};
- return std.meta.stringToEnum(Key, fbs.getWritten());
+ return std.meta.stringToEnum(Key, w.buffered());
}
/// Converts a Ghostty key enum value to a W3C key code.
@@ -379,8 +378,7 @@ pub const Key = enum(c_int) {
const name = @tagName(tag);
var buf: [128]u8 = undefined;
- var fbs = std.io.fixedBufferStream(&buf);
- const w = fbs.writer();
+ var w: std.Io.Writer = .fixed(&buf);
var i: usize = 0;
while (i < name.len) {
if (i == 0) {
@@ -396,7 +394,7 @@ pub const Key = enum(c_int) {
}
const written = buf;
- const result = written[0..fbs.getWritten().len];
+ const result = written[0..w.end];
break :w3c result;
},
};