From 81992cc92743a98066ee1a9025bc74f91cf0e967 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 2 Jul 2026 21:41:13 -0300 Subject: storage and replay --- term.zig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'term.zig') diff --git a/term.zig b/term.zig index 5e472a9e..d332488e 100644 --- a/term.zig +++ b/term.zig @@ -114,6 +114,10 @@ greet: bool = false, cols: u16, rows: u16, +/// Raw bytes read from the pty and fed into ghostty. Dump/replay uses this as the +/// backend-neutral terminal recording instead of serialized rendered cells. +tty_stream: std.ArrayList(u8) = .empty, + /// vertical weight within the column (siblings split the column height by this). vweight: f32 = 1, @@ -186,6 +190,7 @@ pub fn deinit(self: *Term, io: std.Io, gpa: std.mem.Allocator) void { _ = self.reader.cancel(io) catch {}; self.pty.close(io); } + self.tty_stream.deinit(gpa); self.ed_undo.deinit(gpa); self.ed_redo.deinit(gpa); self.tag_tail.deinit(gpa); -- cgit v1.3