mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-01 23:48:35 +00:00
terminal: use LibEnum for the command keys
This commit is contained in:
@@ -35,7 +35,8 @@ pub fn Enum(
|
||||
fields_i += 1;
|
||||
}
|
||||
|
||||
return @Type(.{ .@"enum" = .{
|
||||
// Assigned to var so that the type name is nicer in stack traces.
|
||||
const Result = @Type(.{ .@"enum" = .{
|
||||
.tag_type = switch (target) {
|
||||
.c => c_int,
|
||||
.zig => std.math.IntFittingRange(0, fields_i - 1),
|
||||
@@ -44,6 +45,7 @@ pub fn Enum(
|
||||
.decls = &.{},
|
||||
.is_exhaustive = true,
|
||||
} });
|
||||
return Result;
|
||||
}
|
||||
|
||||
pub const Target = union(enum) {
|
||||
|
Reference in New Issue
Block a user