diff options
Diffstat (limited to 'alacritty/src/event.rs')
-rw-r--r-- | alacritty/src/event.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs index 72070ce7..c934c31a 100644 --- a/alacritty/src/event.rs +++ b/alacritty/src/event.rs @@ -99,6 +99,16 @@ impl SearchState { fn new() -> Self { Self::default() } + + /// Search regex text if a search is active. + pub fn regex(&self) -> Option<&String> { + self.regex.as_ref() + } + + /// Direction of the search from the search origin. + pub fn direction(&self) -> Direction { + self.direction + } } impl Default for SearchState { @@ -836,7 +846,7 @@ impl<N: Notify + OnResize> Processor<N> { &self.config, &self.mouse, self.modifiers, - self.search_state.regex.as_ref(), + &self.search_state, ); } }); |