Integrate Find with transcript selection mode (#57222)

## What changed

- Support `/` to open Find in selection mode and `Enter` to move the cursor to the match, extending an active selection.
- Repeat the accepted search from the cursor with `n` for older matches and `Shift+n` for newer matches. Cancel pending repeats when the cursor or selection changes.
- Restore the previous search, cursor, and selection when cancelling a new search, and reuse the previous search when accepting an empty query.
- Align the cursor to selectable graphemes and preserve expanded matches when leaving selection mode.

## Testing

Add regression coverage for search acceptance and cancellation, repeated searches, Unicode cursor placement, expanded output retention, and history pages loaded while a search is saved.

GitOrigin-RevId: 077be52a54d5e006f65eacc4634baf8c089d3662
This commit is contained in:
Felipe Coury
2026-10-26 20:08:18 +00:00
committed by copyberry
parent abf4bb91ec
commit 285fc74305
7 changed files with 605 additions and 27 deletions
@@ -10,6 +10,7 @@ impl TranscriptView {
cells: &[Arc<dyn HistoryCell>],
motion: CursorMotion,
) {
self.cancel_pending_select_search();
let Some(mut mode) = self.select_mode else {
return;
};