summaryrefslogtreecommitdiff
path: root/core/panes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-24 19:34:57 -0300
committerGabriel Schneider <[email protected]>2026-11-24 19:35:10 -0300
commit9f63733156853c925c31a948b50d4a3a7b77aa70 (patch)
tree1dcc2d689c465ad8cfca31280e381eab9ed8d212 /core/panes.zig
parenta79de661ee8cf443e88030a9546d06da9fbb4c0b (diff)
downloadpardes-9f63733156853c925c31a948b50d4a3a7b77aa70.tar.gz
pardes-9f63733156853c925c31a948b50d4a3a7b77aa70.zip
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
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'core/panes.zig')
-rw-r--r--core/panes.zig3
1 files changed, 3 insertions, 0 deletions
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);