summaryrefslogtreecommitdiff
path: root/src/ninep/events.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 07:29:46 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit740effb5c9e18e7638fde196000030c899e8798e (patch)
treef78a92e9d25b4691796e7e3a286af736b94c5ce1 /src/ninep/events.zig
parent07706163ab3a5dfbb2c6940ac6e5966b19e0074e (diff)
downloadpardes-740effb5c9e18e7638fde196000030c899e8798e.tar.gz
pardes-740effb5c9e18e7638fde196000030c899e8798e.zip
A root exec or look that fails logs its err against the pane it ran at
`err - exec: ...` said nothing of where the line ran; the root's exec and look run at the keyboard's pane, and their err now names it, as a click there would. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/events.zig')
-rw-r--r--src/ninep/events.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ninep/events.zig b/src/ninep/events.zig
index fb0141f4..98799774 100644
--- a/src/ninep/events.zig
+++ b/src/ninep/events.zig
@@ -187,7 +187,13 @@ pub fn noteError(p: *Pardes, req: Req, reply: Reply) void {
if (req.node & tree.sources.archive_node != 0) file = "src";
if (req.node != pardes.filesystem.os_root and req.node & pardes.filesystem.os_node == 0 and req.node & tree.sources.archive_node == 0) {
if (tree.Node.target(req.node)) |t| switch (t) {
- .top => |f| file = f.fileName(),
+ .top => |f| {
+ file = f.fileName();
+ // The root's exec or look ran at the keyboard's pane: its
+ // failure is that pane's, as a click there would be.
+ if ((f == .exec or f == .look) and p.fs.ran_at != 0)
+ serial = std.fmt.bufPrint(&name, "{d}", .{p.fs.ran_at}) catch "-";
+ },
.col => |c| {
serial = "-";
file = (if (c.file == .dir)