From 073695995ecf4a269da8d338b23bfab1d3369c05 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 03:11:42 -0300 Subject: +Errors with no room anywhere logs its text rather than fail the Edit Edit's p and = put their output in +Errors, and when its column had no room the placement refusal failed the whole Edit. +Errors now tries every column with room, the last first, and with none its text is logged as msg records, a line each; the Edit succeeds. Co-Authored-By: Claude Opus 5.5 --- src/ninep/pane.zig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ninep/pane.zig') diff --git a/src/ninep/pane.zig b/src/ninep/pane.zig index 3307eb47..791cb797 100644 --- a/src/ninep/pane.zig +++ b/src/ninep/pane.zig @@ -649,6 +649,12 @@ pub fn appendErrors(p: *Pardes, id: usize, text: []const u8) ?usize { return null; }; exec.placeNew(p, id, id, free, .errors); + // No column had room for it (it closes at the step's end): the text is + // logged instead, a msg a line, so it is not lost and nothing fails. + if (p.unplaced.isSet(free)) { + var lines = std.mem.splitScalar(u8, std.mem.trimEnd(u8, text, "\n"), '\n'); + while (lines.next()) |line| events.noteMessage(p, pane.serial, line[0..@min(line.len, pardes.Messages.LoggedMessage.cap)]); + } return text.len; } -- cgit v1.3