summaryrefslogtreecommitdiff
path: root/src/ninep/ctl.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 01:48:39 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit5b11fc35b961eb03c8816bf957bbf8e27a22ae3e (patch)
tree3a0022699f4c92ec86b2249cf3455139809d56a4 /src/ninep/ctl.zig
parent5b5896965758ff8f2077c8e8e2f0250f580967c3 (diff)
downloadpardes-5b11fc35b961eb03c8816bf957bbf8e27a22ae3e.tar.gz
pardes-5b11fc35b961eb03c8816bf957bbf8e27a22ae3e.zip
The workspace tag has /tagexec, every exec file reads back what it touched, and a tag's words log as the session's
/tagexec runs a word as a click in the workspace tag, as col/<serial>/exec does in a column's. A column's exec was write-only; it and /tagexec now read back the serials the last write touched, as /exec does. A click in a tag no longer goes to the focused pane's event reader, and what a word run from a column's ctl or exec or /tagexec says is logged msg -, not against the focused pane. The README, fs.md and the skill say so, and document the answer record. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/ctl.zig')
-rw-r--r--src/ninep/ctl.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig
index 65878feb..c3c70667 100644
--- a/src/ninep/ctl.zig
+++ b/src/ninep/ctl.zig
@@ -51,14 +51,15 @@ fn noteResult(p: *Pardes, serial: u32) void {
/// Runs one look or exec from the pane `id`, then records the panes it
/// created; failing that, a look records the pane it focused and an exec
/// the pane it acted on (even one it closed).
-pub fn run(p: *Pardes, id: usize, exec: bool, text: []const u8) void {
+pub fn run(p: *Pardes, id: usize, exec: bool, text: []const u8, in_tag: bool) void {
const context = p.panes[id].?.serial;
// A pane an event reader holds hears its clicks instead of acting on
// them (editors/acme/look.c:53 and exec.c:173 send them to winevent),
// and a line written to a look or exec is a click: on that pane, or for
// the root's, on the pane with the keyboard. The reader writes the
// record back to have it done.
- if (p.panes[id].?.fs.readers > 0) {
+ // A click in a column's or the workspace's tag is not the pane's.
+ if (!in_tag and p.panes[id].?.fs.readers > 0) {
const named = std.meta.stringToEnum(Builtin, exec_line.commandText(text)) != null;
var flag: u32 = pardes.ctlfs.events.flag_expansion;
if (named) flag |= pardes.ctlfs.events.flag_builtin;
@@ -139,7 +140,7 @@ pub fn command(p: *Pardes, req: Req, serial: ?u32, exec: bool) Reply {
const id = if (serial) |s| p.paneBySerial(s) orelse break else p.active;
if (p.panes[id] == null) return Reply.fail(req.tag, E.NOENT);
p.fs.no_pane_slot = false;
- run(p, id, exec, text);
+ run(p, id, exec, text, false);
// A pane it would have opened had no slot: the write fails, and
// a look reads back nothing.
if (p.fs.no_pane_slot) {