aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/terminal/c/osc.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/osc.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/terminal/c/osc.zig')
-rw-r--r--vendor/libghostty-vt/src/terminal/c/osc.zig7
1 files changed, 5 insertions, 2 deletions
diff --git a/vendor/libghostty-vt/src/terminal/c/osc.zig b/vendor/libghostty-vt/src/terminal/c/osc.zig
index 7ba32300..2ecc9c97 100644
--- a/vendor/libghostty-vt/src/terminal/c/osc.zig
+++ b/vendor/libghostty-vt/src/terminal/c/osc.zig
@@ -12,6 +12,9 @@ pub const Parser = ?*osc.Parser;
/// C: GhosttyOscCommand
pub const Command = ?*osc.Command;
+/// C: GhosttyOscCommandType
+pub const CommandType = osc.Command.Key;
+
pub fn new(
alloc_: ?*const CAllocator,
result: *Parser,
@@ -44,7 +47,7 @@ pub fn end(parser_: Parser, terminator: u8) callconv(lib.calling_conv) Command {
return parser_.?.end(terminator);
}
-pub fn commandType(command_: Command) callconv(lib.calling_conv) osc.Command.Key {
+pub fn commandType(command_: Command) callconv(lib.calling_conv) CommandType {
const command = command_ orelse return .invalid;
return command.*;
}
@@ -69,7 +72,7 @@ pub fn commandData(
out: ?*anyopaque,
) callconv(lib.calling_conv) bool {
if (comptime std.debug.runtime_safety) {
- _ = std.meta.intToEnum(CommandData, @intFromEnum(data)) catch {
+ _ = std.enums.fromInt(CommandData, @intFromEnum(data)) orelse {
log.warn("commandData invalid data value={d}", .{@intFromEnum(data)});
return false;
};