fix(terminal): reset terminal if closed when exited

This commit is contained in:
CJ van den Berg 2026-02-27 16:07:01 +01:00
parent 0a37c2b05b
commit 29c3424913
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -190,6 +190,10 @@ pub fn unfocus(self: *Self) void {
}
pub fn deinit(self: *Self, allocator: Allocator) void {
if (global_vt) |*vt| if (vt.process_exited) {
vt.deinit(allocator);
global_vt = null;
};
if (self.focused) tui.release_keyboard_focus(Widget.to(self));
self.commands.unregister();
self.plane.deinit();