mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-13 05:16:15 +00:00
Lots of 0.14 changes
This commit is contained in:
@@ -602,7 +602,7 @@ fn renderModesWindow(self: *Inspector) void {
|
||||
}
|
||||
|
||||
const t = self.surface.renderer_state.terminal;
|
||||
inline for (@typeInfo(terminal.Mode).Enum.fields) |field| {
|
||||
inline for (@typeInfo(terminal.Mode).@"enum".fields) |field| {
|
||||
const tag: terminal.modes.ModeTag = @bitCast(@as(terminal.modes.ModeTag.Backing, field.value));
|
||||
|
||||
cimgui.c.igTableNextRow(cimgui.c.ImGuiTableRowFlags_None, 0);
|
||||
@@ -1298,7 +1298,7 @@ fn renderTermioWindow(self: *Inspector) void {
|
||||
);
|
||||
defer cimgui.c.igEndTable();
|
||||
|
||||
inline for (@typeInfo(terminal.Parser.Action.Tag).Enum.fields) |field| {
|
||||
inline for (@typeInfo(terminal.Parser.Action.Tag).@"enum".fields) |field| {
|
||||
const tag = @field(terminal.Parser.Action.Tag, field.name);
|
||||
if (tag == .apc_put or tag == .dcs_put) continue;
|
||||
|
||||
|
@@ -199,7 +199,7 @@ pub const VTEvent = struct {
|
||||
void => {},
|
||||
[]const u8 => try md.put("data", try alloc.dupeZ(u8, v)),
|
||||
else => |T| switch (@typeInfo(T)) {
|
||||
.Struct => |info| inline for (info.fields) |field| {
|
||||
.@"struct" => |info| inline for (info.fields) |field| {
|
||||
try encodeMetadataSingle(
|
||||
alloc,
|
||||
md,
|
||||
@@ -208,7 +208,7 @@ pub const VTEvent = struct {
|
||||
);
|
||||
},
|
||||
|
||||
.Union => |info| {
|
||||
.@"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| {
|
||||
@@ -239,23 +239,23 @@ pub const VTEvent = struct {
|
||||
const Value = @TypeOf(value);
|
||||
const info = @typeInfo(Value);
|
||||
switch (info) {
|
||||
.Optional => if (value) |unwrapped| {
|
||||
.optional => if (value) |unwrapped| {
|
||||
try encodeMetadataSingle(alloc, md, key, unwrapped);
|
||||
} else {
|
||||
try md.put(key, try alloc.dupeZ(u8, "(unset)"));
|
||||
},
|
||||
|
||||
.Bool => try md.put(
|
||||
.bool => try md.put(
|
||||
key,
|
||||
try alloc.dupeZ(u8, if (value) "true" else "false"),
|
||||
),
|
||||
|
||||
.Enum => try md.put(
|
||||
.@"enum" => try md.put(
|
||||
key,
|
||||
try alloc.dupeZ(u8, @tagName(value)),
|
||||
),
|
||||
|
||||
.Union => |u| {
|
||||
.@"union" => |u| {
|
||||
const Tag = u.tag_type orelse @compileError("Unions must have a tag");
|
||||
const tag_name = @tagName(@as(Tag, value));
|
||||
inline for (u.fields) |field| {
|
||||
@@ -273,7 +273,7 @@ pub const VTEvent = struct {
|
||||
}
|
||||
},
|
||||
|
||||
.Struct => try md.put(
|
||||
.@"struct" => try md.put(
|
||||
key,
|
||||
try alloc.dupeZ(u8, @typeName(Value)),
|
||||
),
|
||||
|
Reference in New Issue
Block a user