summaryrefslogtreecommitdiff
path: root/core/Core.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-26 00:21:48 -0300
committerGabriel Schneider <[email protected]>2026-11-26 02:11:20 -0300
commitf6f02bab7554e50241faa1a0c81517126bd06b94 (patch)
tree21e30296d1e9a20b59ef5c66db46c6eddb30145a /core/Core.zig
parent3ace8b385e02a54830decb6aa48d1fa28d076a18 (diff)
downloadpardes-f6f02bab7554e50241faa1a0c81517126bd06b94.tar.gz
pardes-f6f02bab7554e50241faa1a0c81517126bd06b94.zip
Pick, Core, keys: SPC ' steps back through the kept pickers (UX DESIGN L'2, binding; the user liked L-b): Resume reopens the newest kept picker as before, and again as the next leader sequence after an Esc from the one it opened, nothing typed between, the one before it; Ctrl-o in a picker Resume opened steps to the next older kept one (its field, cursor and marks its own, where Resume opens them: Pick.resumeAt), Ctrl-i the next newer, each end said (`Resume: no picker before it: the last 8 are kept`, `Resume: the newest picker`); the head reads `Resume 2/5` before the picker's own word (`Resume 2/5 Find words`); the walk is `Pardes.resume_at` beside `picks` (0 for none, the newest 1): any other picker opened, reopened or landed ends it, and so does any key at rest but the leader and Resume's after it (Pick.keyAtRest, called beside Prompt.keyAtRest in keys.handleKey); the order is a picker's `used` (L': made, landed, or reopened by a walk, the newest the highest, Pick.touch), not its serial, and the picker the ring drops for a new one is the least used of them (Pick.rank: `used`, then the serial, for pickers a dump made before `used`); a list word naming a dropped picker says `walk: that list is gone: the last 8 are kept` (item L'1's walk passes it by); RUN (TEST FIRST): Pick.zig "SPC ' steps back through the kept pickers (UX L'2) ..." keeps three lists A, B, C and asks after each of SPC ', Esc SPC ', Ctrl-o, Ctrl-o (said: no picker before it), Ctrl-i, Ctrl-i, Esc j SPC ' (a key between: the newest again), Esc SPC ' the live picker and its head's `Resume k/3`, then Enter on B (the walk over, B the newest: SPC ' opens it as `1/3 B`), then Ctrl-o onto a list word whose picker is gone (said, passed by, the walk on to the first place): fails on L'1's tree at Pick.zig:2915 on the first SPC ' (expected `1/3 C`, the head has no Resume word), passes now; a user hit it whenever the picker wanted was not the last one; core-test 1126/1299 (173 skipped), shell-test 1347/1350 (3 skipped); load 3.9 to 4.6
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'core/Core.zig')
-rw-r--r--core/Core.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/Core.zig b/core/Core.zig
index f47cc5d8..f9c4d6c9 100644
--- a/core/Core.zig
+++ b/core/Core.zig
@@ -413,6 +413,10 @@ stream: Stream = .{},
/// The pickers: the one live in a view's tag, and the last ones rolled
/// up, which their list words and Resume reopen (Pick.zig).
picks: [pardes.Pick.max_lists]?*pardes.Pick = @splat(null),
+/// The kept picker Resume shows, the newest 1 (Pick.nth), 0 for none:
+/// `SPC '` again after an Esc from it, nothing typed between, opens the
+/// one before it, and Ctrl-o and Ctrl-i in it step through them (UX L'2).
+resume_at: u8 = 0,
/// The panes' `Changes` (jj.zig): what was asked of jj, and what it
/// answered for each pane, by its serial: the session's, not a field of
/// every pane (a digest and a rollback copy walk every pane's fields at