Change cycle mode action to reflect new mode button order

This commit is contained in:
Max Brunsfeld 2023-08-28 15:15:54 -07:00
parent 3eee282a6b
commit 70bea75897

View file

@ -51,15 +51,15 @@ impl SearchMode {
} }
pub(crate) fn next_mode(mode: &SearchMode, semantic_enabled: bool) -> SearchMode { pub(crate) fn next_mode(mode: &SearchMode, semantic_enabled: bool) -> SearchMode {
let next_text_state = if semantic_enabled {
SearchMode::Semantic
} else {
SearchMode::Regex
};
match mode { match mode {
SearchMode::Text => next_text_state, SearchMode::Text => SearchMode::Regex,
SearchMode::Semantic => SearchMode::Regex, SearchMode::Regex => {
SearchMode::Regex => SearchMode::Text, if semantic_enabled {
SearchMode::Semantic
} else {
SearchMode::Text
}
}
SearchMode::Semantic => SearchMode::Text,
} }
} }