diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-24 19:37:15 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-24 19:38:18 -0300 |
| commit | 480f36b85299fa7407c20a2d6482dd093f842bf7 (patch) | |
| tree | 5d07c37c3e4eae82ec35ed100799d5810a8912aa /core/panes.zig | |
| parent | f44d1b7d040acf674814be3cde336527833450e9 (diff) | |
| parent | 9f63733156853c925c31a948b50d4a3a7b77aa70 (diff) | |
| download | pardes-480f36b85299fa7407c20a2d6482dd093f842bf7.tar.gz pardes-480f36b85299fa7407c20a2d6482dd093f842bf7.zip | |
walk UI wave-2 base: line A items 1-4 (kquzozvs) merged with line B items 1-5 (mqmtqvtt)
Diffstat (limited to 'core/panes.zig')
| -rw-r--r-- | core/panes.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/panes.zig b/core/panes.zig index 20feb0b3..115323c4 100644 --- a/core/panes.zig +++ b/core/panes.zig @@ -15,6 +15,7 @@ const dump = @import("dump.zig"); const memory = @import("memory.zig"); const ctlfs = @import("ninep/tree.zig"); const Pipe = @import("Pipe.zig"); +const Trail = @import("Trail.zig"); const Key = pardes.Key; const Cell = pardes.Cell; const BOX_H = pardes.BOX_H; @@ -269,6 +270,9 @@ pub const Pane = struct { /// the current one selected (Places.zig). places: Places = .{}, look_at: ?LookSpot = null, + /// Its walk: the places it stepped through, its owner when it is a + /// reader, whether it is held (Trail.zig, pick-ui SPEC §6). + trail: Trail = .{}, /// `gw`'s words, labelled in order while it waits for a label to be /// typed (gpa-owned); `jump_first` is the label's first letter once typed. jump: std.ArrayList(modal.Selection) = .empty, @@ -1508,6 +1512,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); |
