Expand description
MB.5a (rich minibuffer): search-line-mode.
The /·? search line is a buffer-backed, readline-grade editing
surface (docs/dev/architecture/rich-minibuffer.md §6). Pressing
/ or ? creates / focuses the synthetic one-line *search-line*
Document through the mode-owned creation seam
(lattice_mode::ModeActivator::ensure_named_document) and
focus-swaps it in as the editing buffer
([crate::dispatch::Editor::focus_editing_buffer]). Keys then flow
through the universal Insert dispatcher, so the readline chords
(<C-a>/<C-e>/<C-b>/<C-f>/<C-w>/<C-u>, cursor keys,
<Del>) edit it directly — no search-specific editing code.
search-line-mode is the major mode on that buffer. It owns the
small delta a search line adds over a plain Insert buffer, via an
Insert-mode keymap layer (Mode::keymap, resolved through
keymap_mode_contributions): <CR> submit, <Esc> / <C-c>
cancel. Because the layer is keyed under MajorMode(search-line-mode),
the per-keystroke keymap_gated_ids filter scopes it to the
*search-line* buffer only (mode-ownership; mode-architecture.md
§5.3–5.4).
The buffer is insert-only: there is no Normal-mode entry, so <Esc>
cancels cleanly.
Structs§
- Search
Line Mode search-line-mode: the major mode of the*search-line*buffer.
Constants§
- SEARCH_
LINE_ BUFFER_ NAME - Synthetic name of the
/·?search-line buffer.ephemeralkeeps it out of:lsand the:bn/:bpcycle. - SEARCH_
LINE_ CANCEL - SEARCH_
LINE_ SUBMIT - Command names bound by
search-line-mode’s keymap. Registered asCommandIds incrate::actions(each maps to anAppEffectthat drives theEditor::do_search_line_*handler). - SEARCH_
LINE_ TOGGLE_ EXPAND