fix: handle double tmux control mode exit command

This commit is contained in:
Qwerasd
2026-01-16 16:58:58 -05:00
parent 4e5c1dcdc1
commit 69066200ef

View File

@@ -398,11 +398,16 @@ pub const StreamHandler = struct {
break :tmux;
},
.exit => if (self.tmux_viewer) |viewer| {
// Free our viewer state
viewer.deinit();
self.alloc.destroy(viewer);
self.tmux_viewer = null;
.exit => {
// Free our viewer state if we have one
if (self.tmux_viewer) |viewer| {
viewer.deinit();
self.alloc.destroy(viewer);
self.tmux_viewer = null;
}
// And always break since we assert below
// that we're not handling an exit command.
break :tmux;
},