summaryrefslogtreecommitdiff
path: root/src/ninep/pane.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 05:14:06 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit429c1e5e65afa4c65fa42bbb117c4b32a46a9470 (patch)
tree3621a08103b25ea6cbe44d100d09c51adb639256 /src/ninep/pane.zig
parente933535c9c78695dbcc469fff6a966601fd6c8f6 (diff)
downloadpardes-429c1e5e65afa4c65fa42bbb117c4b32a46a9470.tar.gz
pardes-429c1e5e65afa4c65fa42bbb117c4b32a46a9470.zip
A chorded record written back with its two follow-ups runs once, with its argument
Writing a chorded exec's three records back as read ran the argument and its location as shell commands. The first record (flag 8) now takes the next record as its argument when it comes in the same write, else the one kept from the click (or, with none kept, waits for it); its two follow-up records, however they are written, are consumed as its, never run. Tested written back together and one per write. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/pane.zig')
-rw-r--r--src/ninep/pane.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ninep/pane.zig b/src/ninep/pane.zig
index 4a50b9a1..899d8528 100644
--- a/src/ninep/pane.zig
+++ b/src/ninep/pane.zig
@@ -81,11 +81,19 @@ pub const State = struct {
/// for the record's write-back at `chord_at`, which runs with it.
chord_arg: ?[]u8 = null,
chord_at: Range = .{},
+ /// A chorded record written back: how many of its two follow-up records
+ /// (argument, location) are still to be consumed rather than run.
+ chord_follow: u8 = 0,
+ /// A chorded record written back alone with no argument kept: the
+ /// command, run when its argument record comes.
+ chord_pending: ?[]u8 = null,
+ chord_pending_tag: bool = false,
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);
+ if (pf.chord_pending) |c| gpa.free(c);
pf.events.deinit(gpa);
pf.pty_out.deinit(gpa);
pf.tag_snap.deinit(gpa);