diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-24 22:32:25 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-24 22:32:25 -0300 |
| commit | 791d47a64db09f842d23b3d0b03c40951f30aae6 (patch) | |
| tree | d2d8b9fa92055748d866d9296b26ae995df59172 /core/keys.zig | |
| parent | 89b3e7365bac28c4cd7d52d40c1786c01db5af52 (diff) | |
| download | pardes-791d47a64db09f842d23b3d0b03c40951f30aae6.tar.gz pardes-791d47a64db09f842d23b3d0b03c40951f30aae6.zip | |
walk: Enter on a word of the walk with the keyboard in the tag Looks it as a click does (Tab Execs it, as B2), and out of rest the walk folds to its newest word, its older ones `·` (pick-ui SPEC §6.3, §3.4.3, walk UI line F item 5, the gaps line B left): keys.zig handleKey's Enter-in-a-tag asks tagline.trailAt at the cursor's byte before taking the word as a builtin's operand, the keyboard back in the body as a click leaves it; Trail.folded says how many back steps a tag writes whole (shown_steps at rest, one while TagState.hostOf is its pane), which Trail.write, bytes and stepAt now take (wordOf's fold the caller's), so the name's offset (tagline.nameAt), the forward span, a click on a step, the drafted name and the name's tint all read the trail as it is drawn (nameAt, forwardSpan, onName and draw.tagTintRange take the session); TEST: Trail.zig "Enter on a word of the walk, the keyboard in the tag, goes back to its step ..." (SPC folds `‹@pN › · › rank.zig:20 ›`, Esc unfolds, Enter on rank.zig:10 goes back there); core-test 1026/1193 (167 skipped), 0 failed, load 8
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'core/keys.zig')
| -rw-r--r-- | core/keys.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/keys.zig b/core/keys.zig index 78f45820..651d6417 100644 --- a/core/keys.zig +++ b/core/keys.zig @@ -401,6 +401,13 @@ pub fn handleKey(p: *Pardes, key: Key) void { break :word .{ b.lo, b.hi }; }; const txt = shown[span[0]..span[1]]; + // On a word of the pane's walk, the step's Look or Exec, as a + // click there (SPEC §6.3). + if (header == null and t.what == .tag) if (tagline.trailAt(p, pane, modal.selectionCursor(shown, range))) |step| { + pane.focus = .body; + if (cmd == config.look_cmd) pardes.Trail.lookStep(p, p.view().active, step) else pardes.Trail.execStep(p, p.view().active, step); + return; + }; // A column tag's command acts on that column, empty or not. p.exec_column = if (header != null) p.headerColumn() else null; defer p.exec_column = null; |
