From e6cdc5f9d327d30886a8fa2961e7a55b4ca0b692 Mon Sep 17 00:00:00 2001 From: Pascal Kuthe Date: Wed, 6 Sep 2023 16:03:48 +0200 Subject: Don't use word splitting during fuzzy matching (#8192) --- helix-core/src/fuzzy.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'helix-core') 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>( pattern: &str, items: impl IntoIterator, 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) } -- cgit v1.2.3-70-g09d2