diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 07:05:46 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | 1b513045336b3c7381c447ffa8c9167f8b1a5a0a (patch) | |
| tree | bf9377e7178f367c3ad0b35446f4aa9eaf9600d2 /src/pardes.zig | |
| parent | 96383331f09e8af3fa24f767b3c56863309723b8 (diff) | |
| download | pardes-1b513045336b3c7381c447ffa8c9167f8b1a5a0a.tar.gz pardes-1b513045336b3c7381c447ffa8c9167f8b1a5a0a.zip | |
A builtin's Verbose announcement is logged only when it succeeds
A failure said while it ran (Exit's refusal, a Del refused) or later by
the host (a Save's write, a Dump's) left `msg N Save` in the log as if it
had worked. The announcement's record is remembered and taken back out
on either, unless a follower read it already. A refused pane/new logs its
err alone, and a failed Dump says its reason in words (`file not found`,
not `FileNotFound`) so its msg goes and the err is the one record.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 98b8819c..739d5bf2 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -5219,8 +5219,9 @@ pub const Pardes = struct { var what: [limits.host_path_cap + 8]u8 = undefined; const operation = std.fmt.bufPrint(&what, "Dump {s}", .{path}) catch "Dump"; p.reportError(p.active, operation, err); - var buf: [256]u8 = undefined; - const said = std.fmt.bufPrint(&buf, "{s}: {s}", .{ operation, @errorName(err) }) catch "Dump failed"; + // In the words the message row has, so the write's err is the one + // record of it (its msg goes: 9p_io, dropMessage). + const said = if (p.panes[p.active]) |pane| pane.msg[0..pane.msg_len] else "Dump failed"; const kept = @import("Messages.zig").clip(said, p.fs.late_failure.len); @memcpy(p.fs.late_failure[0..kept.len], kept); p.fs.late_failure_len = @intCast(kept.len); |
