diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-09-10 21:51:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-10 21:51:57 +0300 |
| commit | 425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch) | |
| tree | e52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/terminal/c/mouse_encode.zig | |
| parent | 90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff) | |
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/terminal/c/mouse_encode.zig')
| -rw-r--r-- | vendor/libghostty-vt/src/terminal/c/mouse_encode.zig | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/vendor/libghostty-vt/src/terminal/c/mouse_encode.zig b/vendor/libghostty-vt/src/terminal/c/mouse_encode.zig index 331dd606..2586a57a 100644 --- a/vendor/libghostty-vt/src/terminal/c/mouse_encode.zig +++ b/vendor/libghostty-vt/src/terminal/c/mouse_encode.zig @@ -113,7 +113,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; }; @@ -137,7 +137,7 @@ fn setoptTyped( switch (option) { .event => { if (comptime std.debug.runtime_safety) { - _ = std.meta.intToEnum(TrackingMode, @intFromEnum(value.*)) catch { + _ = std.enums.fromInt(TrackingMode, @intFromEnum(value.*)) orelse { log.warn("setopt invalid TrackingMode value={d}", .{@intFromEnum(value.*)}); return; }; @@ -149,7 +149,7 @@ fn setoptTyped( .format => { if (comptime std.debug.runtime_safety) { - _ = std.meta.intToEnum(Format, @intFromEnum(value.*)) catch { + _ = std.enums.fromInt(Format, @intFromEnum(value.*)) orelse { log.warn("setopt invalid Format value={d}", .{@intFromEnum(value.*)}); return; }; @@ -324,7 +324,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); @@ -346,7 +347,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); |
