aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/terminal/tmux/output.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/tmux/output.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/terminal/tmux/output.zig')
-rw-r--r--vendor/libghostty-vt/src/terminal/tmux/output.zig24
1 files changed, 9 insertions, 15 deletions
diff --git a/vendor/libghostty-vt/src/terminal/tmux/output.zig b/vendor/libghostty-vt/src/terminal/tmux/output.zig
index 6b8073e4..9e21703b 100644
--- a/vendor/libghostty-vt/src/terminal/tmux/output.zig
+++ b/vendor/libghostty-vt/src/terminal/tmux/output.zig
@@ -70,23 +70,17 @@ pub fn format(
/// format variables. This can be used with `parseFormatStruct` to
/// parse an output string into a format struct.
pub fn FormatStruct(comptime vars: []const Variable) type {
- var fields: [vars.len]std.builtin.Type.StructField = undefined;
- for (vars, &fields) |variable, *field| {
- field.* = .{
- .name = @tagName(variable),
- .type = variable.Type(),
- .default_value_ptr = null,
- .is_comptime = false,
- .alignment = @alignOf(variable.Type()),
- };
+ var names: [vars.len][]const u8 = undefined;
+ var types: [vars.len]type = undefined;
+ var attrs: [vars.len]std.builtin.Type.StructField.Attributes = undefined;
+
+ for (vars, &names, &types, &attrs) |variable, *name, *ty, *attr| {
+ name.* = @tagName(variable);
+ ty.* = variable.Type();
+ attr.* = .{ .@"align" = @alignOf(variable.Type()) };
}
- return @Type(.{ .@"struct" = .{
- .layout = .auto,
- .fields = &fields,
- .decls = &.{},
- .is_tuple = false,
- } });
+ return @Struct(.auto, null, &names, &types, &attrs);
}
/// Possible variables in a tmux format string that we support.