From 9e30f716e73b4b830b0fde7c5142d8f6b8deb511 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 1 Oct 2026 11:28:48 -0300 Subject: A name held for its newline that no newline could make good (a terminal's, a component over 255 bytes, a path too long) is refused by the write that held it, not at the close (monkey9p's close_runs_only_line_files; follows sswkwwvv) Co-Authored-By: Claude Opus 5.5 --- src/ninep/tree.zig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ninep/tree.zig') diff --git a/src/ninep/tree.zig b/src/ninep/tree.zig index b0ffdd68..1990d09e 100644 --- a/src/ninep/tree.zig +++ b/src/ninep/tree.zig @@ -1278,6 +1278,11 @@ fn writeLines(p: *Pardes, req: Req, target: Target) Reply { // its message is no whole line. An Edit block is whole when it closes. const end = ctl.completeEnd(p, o.pending.items); if (end == 0) { + if (target == .pane and target.pane.file == .name) if (pane.heldNameFault(p, target.pane.serial, o.pending.items)) |why| { + o.pending.clearRetainingCapacity(); + o.discarding = true; + return failText(req.tag, E.INVAL, why); + }; if (o.pending.items.len <= pending_cap) return .{ .tag = req.tag, .written = @intCast(req.data.len) }; o.pending.clearRetainingCapacity(); o.discarding = true; -- cgit v1.3