Implement navigation between project search matches

This commit is contained in:
Nathan Sobo 2022-02-27 14:18:04 -07:00
parent 7ef98fb935
commit 64d22925c2
3 changed files with 167 additions and 26 deletions

View file

@ -1,4 +1,4 @@
use gpui::MutableAppContext;
use gpui::{action, MutableAppContext};
mod buffer_search;
mod project_search;
@ -8,9 +8,18 @@ pub fn init(cx: &mut MutableAppContext) {
project_search::init(cx);
}
action!(ToggleSearchOption, SearchOption);
action!(SelectMatch, Direction);
#[derive(Clone, Copy)]
pub enum SearchOption {
WholeWord,
CaseSensitive,
Regex,
}
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum Direction {
Prev,
Next,
}