From 1b513045336b3c7381c447ffa8c9167f8b1a5a0a Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 07:05:46 -0300 Subject: 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 --- src/pardes.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/pardes.zig') 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); -- cgit v1.3