Make CycleSearchAlgorithm only cycle between algorithms, without changing ranking

pull/585/head
Noah Mayr 1 year ago
parent cc1ab30ed5
commit 7aee9177fd

@ -2124,6 +2124,13 @@ xplr.config.modes.builtin.search = {
},
},
["ctrl-z"] = {
help = "toggle ranking",
messages = {
"ToggleRankedSearch",
"ExplorePwdAsync",
},
},
["ctrl-a"] = {
help = "cycle search algorithm",
messages = {
"CycleSearchAlgorithm",

@ -48,10 +48,10 @@ impl SearchAlgorithm {
pub fn cycle(self) -> Self {
match self {
Self::Fuzzy => Self::FuzzyUnranked,
Self::FuzzyUnranked => Self::Regex,
Self::Regex => Self::RegexUnranked,
Self::RegexUnranked => Self::Fuzzy,
Self::Fuzzy => Self::Regex,
Self::FuzzyUnranked => Self::RegexUnranked,
Self::Regex => Self::Fuzzy,
Self::RegexUnranked => Self::FuzzyUnranked,
}
}

Loading…
Cancel
Save