summaryrefslogtreecommitdiff
path: root/src/ninep/tree.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 02:15:43 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit9391d35d357ebf18759c10f6c756855e5a8f7b50 (patch)
tree181645499d1728c12806dabb1ee65cb61e9f5a41 /src/ninep/tree.zig
parent5492da0ba1d5f1c1cc0a880f82107961627c9ba6 (diff)
downloadpardes-9391d35d357ebf18759c10f6c756855e5a8f7b50.tar.gz
pardes-9391d35d357ebf18759c10f6c756855e5a8f7b50.zip
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 <[email protected]>
Diffstat (limited to 'src/ninep/tree.zig')
-rw-r--r--src/ninep/tree.zig4
1 files changed, 4 insertions, 0 deletions
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;