mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-13 05:16:15 +00:00
[3/12] parse ConEmu OSC9;3
This commit is contained in:
@@ -208,6 +208,20 @@ pub const VTEvent = struct {
|
||||
);
|
||||
},
|
||||
|
||||
.Union => |info| {
|
||||
const Tag = info.tag_type orelse @compileError("Unions must have a tag");
|
||||
const tag_name = @tagName(@as(Tag, v));
|
||||
inline for (info.fields) |field| {
|
||||
if (std.mem.eql(u8, field.name, tag_name)) {
|
||||
if (field.type == void) {
|
||||
break try md.put("data", tag_name);
|
||||
} else {
|
||||
break try encodeMetadataSingle(alloc, md, tag_name, @field(v, field.name));
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
else => {
|
||||
@compileLog(T);
|
||||
@compileError("unsupported type, see log");
|
||||
|
Reference in New Issue
Block a user