#[derive(Clone, Debug, PartialEq, Eq)]
pub struct SearchMatch {
pub line: usize,
pub column: usize,
pub length: usize,
}
impl SearchMatch {
pub fn new(line: usize, column: usize, length: usize) -> Self {
Self {
line,
column,
length,
}
}
}
#[derive(Clone, Debug)]
pub struct SearchConfig {
pub case_sensitive: bool,
pub use_regex: bool,
pub whole_word: bool,
pub wrap_around: bool,
}
impl Default for SearchConfig {
fn default() -> Self {
Self {
case_sensitive: false,
use_regex: false,
whole_word: false,
wrap_around: true,
}
}
}
#[derive(Debug, Clone)]
pub enum SearchAction {
None,
ScrollToMatch(usize),
Close,
}