Expand description
Shared search-match scanning.
One canonical “pattern → match ranges within a line” implementation for every consumer that needs to know WHERE a search pattern matches:
hjkl-engine’sSearchStateper-row match cache (n/Nnavigation),hjkl-buffer-tui’s hlsearch painting (BufferView::row_search_ranges),- the app’s quickfix-dock match overlay (highlighting the
:greppattern inside each entry’s message text).
All three previously (or would otherwise) hand-roll the same
find_iter → (start, end) expression; keeping it here — the lowest crate
they all already depend on — guarantees they can never disagree about
what counts as a match.
Functions§
- search_
match_ ranges - Byte ranges (
(start, end), half-open) of every non-overlapping match ofreinline, in order. Empty when nothing matches.