mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 13:16:11 +03:00

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.