From b2886edda1a1630f38732975c04bdf4d6f6ded29 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 30 Sep 2026 19:30:33 -0300 Subject: A refused write to dot after a shell's truncation changes nothing: the truncation waits for the write, as limit's does echo /nomatch/ > dot truncated dot to an empty range at the top before the write was refused, so a failed address still moved the selection and scrolled. The truncation is now held until the write that follows it: that write sets dot, or, refused, leaves it as it was. A truncation with no write after it (: > dot) empties it when its open goes. Co-Authored-By: Claude Opus 5.5 --- src/ninep/tree.zig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ninep/tree.zig') diff --git a/src/ninep/tree.zig b/src/ninep/tree.zig index 4300d2b5..c0ace5be 100644 --- a/src/ninep/tree.zig +++ b/src/ninep/tree.zig @@ -949,6 +949,12 @@ fn releaseHandle(p: *Pardes, req: Req) void { if (t == .pane and t.pane.file == .limit) if (p.paneBySerial(t.pane.serial)) |id| { p.panes[id].?.fs.limit_truncated = null; }; + // `: > dot` empties it once its open goes, no write having set it. + if (t == .pane and t.pane.file == .dot) if (p.paneBySerial(t.pane.serial)) |id| { + const pn = p.panes[id].?; + if (pn.fs.dot_truncated) pane.setDot(pn, .{}); + pn.fs.dot_truncated = false; + }; 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