diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 04:48:12 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 009e4ab8779bc7adc7b626814d36e62231d7a0ea (patch) | |
| tree | d77c04f04b1d11c62aebb4985bce36208e17075c /src/ninep/pane.zig | |
| parent | bda5b5f621d0edd8e26f9700043ab21cae18f329 (diff) | |
| download | pardes-009e4ab8779bc7adc7b626814d36e62231d7a0ea.tar.gz pardes-009e4ab8779bc7adc7b626814d36e62231d7a0ea.zip | |
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 <[email protected]>
Diffstat (limited to 'src/ninep/pane.zig')
| -rw-r--r-- | src/ninep/pane.zig | 5 |
1 files changed, 5 insertions, 0 deletions
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); |
