diff options
author | Pascal Kuthe | 2023-09-06 14:03:48 +0000 |
---|---|---|
committer | GitHub | 2023-09-06 14:03:48 +0000 |
commit | e6cdc5f9d327d30886a8fa2961e7a55b4ca0b692 (patch) | |
tree | bbd74e9a7068d6a69f97089e7a22a25d26b9d552 /helix-core | |
parent | 0cfd46c14f67351db1e739834f58d8ed15d2bb4d (diff) |
Don't use word splitting during fuzzy matching (#8192)
Diffstat (limited to 'helix-core')
-rw-r--r-- | helix-core/src/fuzzy.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-core/src/fuzzy.rs b/helix-core/src/fuzzy.rs index e40a2d06..549c6b0e 100644 --- a/helix-core/src/fuzzy.rs +++ b/helix-core/src/fuzzy.rs @@ -1,6 +1,6 @@ use std::ops::DerefMut; -use nucleo::pattern::{AtomKind, CaseMatching, Pattern}; +use nucleo::pattern::{Atom, AtomKind, CaseMatching}; use nucleo::Config; use parking_lot::Mutex; @@ -32,12 +32,12 @@ pub fn fuzzy_match<T: AsRef<str>>( pattern: &str, items: impl IntoIterator<Item = T>, path: bool, -) -> Vec<(T, u32)> { +) -> Vec<(T, u16)> { let mut matcher = MATCHER.lock(); matcher.config = Config::DEFAULT; if path { matcher.config.set_match_paths(); } - let pattern = Pattern::new(pattern, CaseMatching::Smart, AtomKind::Fuzzy); + let pattern = Atom::new(pattern, CaseMatching::Smart, AtomKind::Fuzzy, false); pattern.match_list(items, &mut matcher) } |