mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-17 23:31:56 +00:00
termio/exec: remove a bunch of state that is duplicated on StreamHandler
A lot of the state that we put on Exec is just there to copy to StreamHandler, but we already have it in DerivedConfig. I think this whole copy copy copy is just legacy cruft since termio.Exec is one of the older parts of the source code. This rearchitects the Exec struct to act more like Surface and Renderer where it stores its derived config. This lets us avoid a few extra allocations and removes a LOT of struct member noise from termio.Exec. For pointer lifetimes, the memory allocated is now owned by DerivedConfig. When changeConfig is called, its the only time BOTH are still alive, so we can safely swap pointers and deinit without having to duplicate across threads. This is the same as renderer/surface.
This commit is contained in:
@@ -898,7 +898,7 @@ term: []const u8 = "xterm-ghostty",
|
||||
|
||||
/// String to send when we receive ENQ (0x05) from the command that we are
|
||||
/// running. Defaults to "" if not set.
|
||||
@"enquiry-response": ?[]const u8 = null,
|
||||
@"enquiry-response": []const u8 = "",
|
||||
|
||||
/// This is set by the CLI parser for deinit.
|
||||
_arena: ?ArenaAllocator = null,
|
||||
|
Reference in New Issue
Block a user