From 9391d35d357ebf18759c10f6c756855e5a8f7b50 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 02:15:43 -0300 Subject: A limit write that fails keeps the limit it had A shell's > truncates limit, which lifted it, before the write; a write that then failed left no limit at all. The truncation now keeps the old limit until that open's write, and a failed write puts it back; a bare truncation still lifts it once its open is released. Co-Authored-By: Claude Opus 5.5 --- src/ninep/tree.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ninep/tree.zig') diff --git a/src/ninep/tree.zig b/src/ninep/tree.zig index da9c37f0..278732b5 100644 --- a/src/ninep/tree.zig +++ b/src/ninep/tree.zig @@ -806,6 +806,10 @@ fn releaseHandle(p: *Pardes, req: Req) void { p.panes[id].?.fs.tag_rewrite = false; p.panes[id].?.fs.tag_held_newline = false; }; + // `: > limit` clears it for good once its open goes. + if (t == .pane and t.pane.file == .limit) if (p.paneBySerial(t.pane.serial)) |id| { + p.panes[id].?.fs.limit_truncated = null; + }; if (t == .col and t.col.file == .tag) cols.released(p, t.col.serial); if (t == .top and t.top == .tag) cols.released(p, null); const o = openOf(p, req) orelse return; -- cgit v1.3