From 9f63733156853c925c31a948b50d4a3a7b77aa70 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 24 Nov 2026 19:34:57 -0300 Subject: walk (pick-ui SPEC §6.5, §11, item 5 of the Walk UI line B): a held pane's reader is its tether and closes with it (panes.removePane: Trail.readerOf first, its rows where a closed pane's go), one kept or typed into stays; Keep (the tag word, `SPC j k`, item 1) and an edit hold a reader the same way, its places, owner and forward steps leaving its tag and a search's or a recipe's word staying, so the next jump from its old owner makes a new reader; TEST FIRST: Trail.zig "closing a held pane closes its reader; a kept reader stays; typed into, a reader is held and its walk leaves its tag" (Keep itself in the §6.7 session test); core-test 1000/1166 (166 skipped), pane-test 183/184, behaviour-test 277/277 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- core/panes.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/panes.zig') diff --git a/core/panes.zig b/core/panes.zig index c11fdc94..1a27b238 100644 --- a/core/panes.zig +++ b/core/panes.zig @@ -1510,6 +1510,9 @@ pub fn removePane(p: *Pardes, id: usize, to: ?usize) error{OutOfMemory}!void { try p.removePane(k, id); layout.compute(p); }; + // A held pane's reader is its tether: it closes with it (pick-ui + // SPEC §11), its rows going where a closed pane's go. + if (Trail.readerOf(p, pane)) |r| try p.removePane(r, null); // A docked pane's rows go back to its owner and nobody else. const owner = layout.ownerOf(p, id); const place = layout.findPane(p, id); -- cgit v1.3