From 009e4ab8779bc7adc7b626814d36e62231d7a0ea Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 04:48:12 -0300 Subject: A chorded exec an event reader holds is told its argument, and runs with it With event open, a 2-1 chord's exec went out as one record with flag 8 and nothing after it: the argument was freed unsaid. As acme does (exec.c:150-190), two records follow it, the argument's text and where it came from (file:#q0,#q1, empty when not known), and the pane keeps the argument, so the record written back runs with it (acme's own write-back, xfid.c:842, passes none; the reader was told, so it runs as the click would have). Co-Authored-By: Claude Opus 5.5 --- src/ninep/pane.zig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ninep/pane.zig') diff --git a/src/ninep/pane.zig b/src/ninep/pane.zig index 791cb797..8cac55d6 100644 --- a/src/ninep/pane.zig +++ b/src/ninep/pane.zig @@ -77,10 +77,15 @@ pub const State = struct { /// Installed during this update; /log hears about it once the update ends /// and the pane has its file, name and place. unannounced: bool = false, + /// A chorded exec's argument an event reader was told of (flag 8), kept + /// for the record's write-back at `chord_at`, which runs with it. + chord_arg: ?[]u8 = null, + chord_at: Range = .{}, pub const Range = struct { q0: u32 = 0, q1: u32 = 0 }; pub fn deinit(pf: *State, gpa: std.mem.Allocator) void { + if (pf.chord_arg) |a| gpa.free(a); pf.events.deinit(gpa); pf.pty_out.deinit(gpa); pf.tag_snap.deinit(gpa); -- cgit v1.3