terminal/tmux: introduce command queue for viewer

This commit is contained in:
Mitchell Hashimoto
2025-12-08 07:09:11 -08:00
parent ec5a60a119
commit 86cd489701
2 changed files with 156 additions and 43 deletions

View File

@@ -392,7 +392,8 @@ pub const StreamHandler = struct {
assert(self.tmux_viewer == null);
const viewer = try self.alloc.create(terminal.tmux.Viewer);
errdefer self.alloc.destroy(viewer);
viewer.* = .init(self.alloc);
viewer.* = try .init(self.alloc);
errdefer viewer.deinit();
self.tmux_viewer = viewer;
break :tmux;
},