feat(editor): / forward search with n/N repeat (v0.7)

Literal case-sensitive substring search sharing the : command line's
editing (cmd_prompt discriminates the prompt; Enter dispatches). Jumps
on Enter only — incremental caret-chasing loses to the e-ink refresh
cost, same call as the snippet no-popup decision. Wraps with a notice,
keeps the caret on a miss, bare / repeats the editor-global last
pattern. n/N live in move_by so counts and Visual extension come free;
they are not operator targets.
This commit is contained in:
Julien Calixte
2026-07-13 22:15:19 +02:00
parent 4f0d745e84
commit 8d22f81804
2 changed files with 259 additions and 5 deletions

View File

@@ -3,11 +3,21 @@
> Part of the [Typoena macro plan](macroplan.md). Requirements and targets:
> [qfd.md](qfd.md). Load-bearing decisions: [adr.md](adr.md).
**Status:** the **`:gl` pull command landed in the editor** (2026-07-11,
**Status:** **`/` search + `n N` done in core** (2026-07-13, host-tested — 207
editor tests). The **`:gl` pull command landed in the editor** (2026-07-11,
host-tested) — `Effect::Pull` + a firmware stub; the on-device fetch +
fast-forward is still to build. Search not started.
fast-forward is still to build.
- [ ] `/` forward search, `n N`
- [x] `/` forward search, `n N` — done in core 2026-07-13 (host-tested).
Literal, case-sensitive substring (no regex on-device, no smartcase
surprises); `/` reuses the `:` command line's editing with a `/` prompt
(one command-line mode, as in vim), and the jump happens on **Enter
only** — no incremental caret-chasing, for the same e-ink-refresh reason
snippets have no completion popup. Wraps around with a "wrapped" notice;
"not found: pat" leaves the caret alone; a bare `/`+Enter repeats the
last pattern, which is editor-global (survives buffer switches, like
vim's search register). `n`/`N` are motions (counts work, Visual extends
over them); deliberately **not** operator targets (`dn` out of scope).
- [~] `:gl` — pull: fetch + **fast-forward only**, refuse on divergence and
surface it (renamed from the planned `:Gpull`). Editor command +
`Effect::Pull` done 2026-07-11 (host-tested); the git-thread