justerm_core/search.rs
1//! Search results (see `docs/architecture.md` "Engine API": `search`).
2//!
3//! A `Match` is an inclusive range in **absolute buffer coordinates** (a line
4//! index into `[scrollback ++ screen]`, the same coordinate the selection model
5//! uses). The engine finds matches; the consumer drives next/prev navigation
6//! (holding the `Vec<Match>` and calling `scroll_to_match`), mirroring
7//! Alacritty's "engine finds, frontend navigates" split.
8
9/// One literal match, inclusive on both ends, in absolute buffer coordinates.
10#[derive(Clone, Copy, PartialEq, Eq, Debug)]
11pub struct Match {
12 pub start_line: usize,
13 pub start_col: usize,
14 pub end_line: usize,
15 pub end_col: usize,
16}