mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-24 04:36:10 +03:00

Fixes #965 When processing keybindings that closed the surface (`close_surface`, `close_window`), the surface and associated runtime structures would be freed so we could segfault. This PR introduces a new enum result for input events (only key for now) that returns whether an event resulted in a close. In this case, callers can properly return immediately and avoid writing to deallocated memory.