mirror of
https://github.com/lotabout/skim.git
synced 2026-09-10 07:16:23 -04:00
fix(frizbee): correctly compute max_typos
This commit is contained in:
parent
d29c30c756
commit
2b71c2bad9
|
|
@ -11,10 +11,7 @@ pub struct FrizbeeMatcher {}
|
|||
|
||||
fn adaptive(pattern: &str) -> Config {
|
||||
Config {
|
||||
max_typos: match pattern.chars().count() / 4 {
|
||||
0 => None,
|
||||
n => Some(n.try_into().unwrap()),
|
||||
},
|
||||
max_typos: Some(pattern.chars().count().saturating_div(4).try_into().unwrap()),
|
||||
prefilter: true,
|
||||
sort: false,
|
||||
scoring: Scoring::default(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue