aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/terminal/c/key_encode.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/terminal/c/key_encode.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/terminal/c/key_encode.zig')
-rw-r--r--vendor/libghostty-vt/src/terminal/c/key_encode.zig10
1 files changed, 6 insertions, 4 deletions
diff --git a/vendor/libghostty-vt/src/terminal/c/key_encode.zig b/vendor/libghostty-vt/src/terminal/c/key_encode.zig
index f5d459f0..f0aec36e 100644
--- a/vendor/libghostty-vt/src/terminal/c/key_encode.zig
+++ b/vendor/libghostty-vt/src/terminal/c/key_encode.zig
@@ -80,7 +80,7 @@ pub fn setopt(
value: ?*const anyopaque,
) callconv(lib.calling_conv) void {
if (comptime std.debug.runtime_safety) {
- _ = std.meta.intToEnum(Option, @intFromEnum(option)) catch {
+ _ = std.enums.fromInt(Option, @intFromEnum(option)) orelse {
log.warn("setopt invalid option value={d}", .{@intFromEnum(option)});
return;
};
@@ -113,7 +113,7 @@ fn setoptTyped(
},
.macos_option_as_alt => {
if (comptime std.debug.runtime_safety) {
- _ = std.meta.intToEnum(OptionAsAlt, @intFromEnum(value.*)) catch {
+ _ = std.enums.fromInt(OptionAsAlt, @intFromEnum(value.*)) orelse {
log.warn("setopt invalid OptionAsAlt value={d}", .{@intFromEnum(value.*)});
return;
};
@@ -257,7 +257,8 @@ test "setopt_from_terminal" {
try testing.expectEqual(Result.success, terminal_c.new(
&lib.alloc.test_allocator,
&t,
- .{ .cols = 80, .rows = 24, .max_scrollback = 0 },
+ 80,
+ 24,
));
defer terminal_c.free(t);
@@ -283,7 +284,8 @@ test "setopt_from_terminal null" {
try testing.expectEqual(Result.success, terminal_c.new(
&lib.alloc.test_allocator,
&t,
- .{ .cols = 80, .rows = 24, .max_scrollback = 0 },
+ 80,
+ 24,
));
defer terminal_c.free(t);
setopt_from_terminal(null, t);