diff options
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); |
