summaryrefslogtreecommitdiff
path: root/src/panes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 23:32:31 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:18 -0300
commit48c129a701d60abdb836bbb400d949cc61ed2820 (patch)
tree42f6ab7e64bc02c208a062eb31ad4937e4339f04 /src/panes.zig
parentafaa2428b346f6dd1d165abe1396dce9150fa05c (diff)
downloadpardes-48c129a701d60abdb836bbb400d949cc61ed2820.tar.gz
pardes-48c129a701d60abdb836bbb400d949cc61ed2820.zip
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 <[email protected]>
Diffstat (limited to 'src/panes.zig')
-rw-r--r--src/panes.zig4
1 files changed, 4 insertions, 0 deletions
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,