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/panes.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/panes.zig') diff --git a/src/panes.zig b/src/panes.zig index 356f4913..1e5be107 100644 --- a/src/panes.zig +++ b/src/panes.zig @@ -312,8 +312,7 @@ pub const Pane = struct { /// Close an open prompt, answered or not. Its answer goes with it, and an /// s/S preview keeps whatever it last previewed. pub fn closePrompt(pane: *Pane) void { - if (pane.input.own) |text| pane.gpa.free(text); - pane.input = .{ .what = .input }; + pane.input.deinit(pane.gpa); pane.prompt = .none; pane.nsel_snap = 0; } -- cgit v1.3