mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-26 23:08:25 +00:00
gtk: use simpler method for passing overrides around
As discussed in Discord, this commit drops the `ConfigOverride` object in favor of a simpler method of passing the overrides around. Completely avoiding changes to the core wasn't possible but it's very minimal now.
This commit is contained in:
@@ -165,6 +165,16 @@ pub const Command = union(enum) {
|
||||
};
|
||||
}
|
||||
|
||||
pub fn deinit(self: *const Self, alloc: Allocator) void {
|
||||
switch (self.*) {
|
||||
.shell => |v| alloc.free(v),
|
||||
.direct => |l| {
|
||||
for (l) |v| alloc.free(v);
|
||||
alloc.free(l);
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub fn formatEntry(self: Self, formatter: formatterpkg.EntryFormatter) !void {
|
||||
switch (self) {
|
||||
.shell => |v| try formatter.formatEntry([]const u8, v),
|
||||
|
||||
Reference in New Issue
Block a user