From 48c129a701d60abdb836bbb400d949cc61ed2820 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 30 Sep 2026 23:32:31 -0300 Subject: A command run from a pane gets acme's $winid, the serial of the pane it was run from; one from a column's or the workspace's tag gets none PARDES_PANE names the command pane itself, so a script a click ran had no way to address the pane it was run in, as acme's win scripts do with $winid. The command pane now remembers that pane and its child gets winid set to it; a header tag's command, which no pane owns, gets winid unset. PARDES_PANE is unchanged. Co-Authored-By: Claude Opus 5.5 --- src/panes.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/panes.zig') diff --git a/src/panes.zig b/src/panes.zig index 0380f89f..a395d6ed 100644 --- a/src/panes.zig +++ b/src/panes.zig @@ -124,6 +124,10 @@ pub const Pane = struct { /// A command pane (exec.zig runCommand): the line its child runs as /// `$SHELL -c`, owned, where an interactive terminal has null. command: ?[]u8 = null, + /// The pane whose tag or text the command was run from, its child's + /// `$winid` (acme's name); 0 for one from a column's or the workspace's + /// tag, which no pane owns. + command_from: u32 = 0, /// The command's child has exited, and with what status (null: unknown, /// shown `exit ?`). command_done: bool = false, -- cgit v1.3