From bb380c6b44b649a2e9192311478ee52d69c702dc Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 01:09:59 -0300 Subject: Free a pane's texts with Text.deinit alone Teardown freed the body's undo by hand beside the tag's deinit, and the prompt line's characters by hand too; the three texts now go the same way, so what a Text owns is freed in one place. Co-Authored-By: Claude Opus 5.5 --- src/pardes.zig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index 40e49d6a..b7cf5574 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -4120,10 +4120,9 @@ pub const Pardes = struct { if (comptime pdf_enabled) if (pane.pdf) |*pv| panes.Pdf.deinitPane(p, pane, pv); if (pane.file) |*file| panes.File.deinit(p, pane, file); if (pane.ovl) |o| p.gpa.free(o.text); - if (pane.input.own) |text| p.gpa.free(text); + pane.body.deinit(p.gpa); pane.tag.deinit(p.gpa); - for (pane.body.ed_undo[0..pane.body.ed_undo_len]) |sn| if (sn.ovl) |o| p.gpa.free(o.text); - for (pane.body.ed_redo[0..pane.body.ed_redo_len]) |sn| if (sn.ovl) |o| p.gpa.free(o.text); + pane.input.deinit(p.gpa); panes.Terminal.deinitEmulator(pane, p.gpa); pane.clearCwd(); pane.fs.deinit(p.gpa); -- cgit v1.3