9206083 (Fraser Tweedale, 9 minutes ago)
add scrollPreviousMatch action
Alongside the existing "scroll to next match" action, add the
`scrollPreviousMatch` action. Bind `'N'` to this action in the default
keybindings.
Also rename `scrollNextWord` to `scrollNextMatch` which better expresses
the real behaviour (a search term can match part of a term or span word
boundaries).
d68f2f2 (Fraser Tweedale, 49 minutes ago)
further simplify mail body search
The remains a considerable dupliation of data within our implementation of
mail body search. In particular, `ScrollStep` duplicates `Match` values
from `Line`.
Refactor the implementation in the following ways:
- Promote the `[Match]` from the `Line` data type to the `MailBody`
type (as a single, combined list)
- Remove the `Line` data type, replacing it with bare `Text`
- Replace the `FocusRing ScrollStep` with an `Int` that records the
current search hit index.
- Extract the "scroll to search index" behaviour as a helper action.
It modifies the search index, wrapping if necessary. Update
relevant actions to use the new method.
- Clean up the rendering function