fix: support Unicode/non-ASCII scripts in combo_box search

This commit is contained in:
Hojjat 2026-03-31 16:10:59 -06:00 committed by Ashley Wulber
parent 9b2857083e
commit f141c3ce5c

View file

@ -977,7 +977,8 @@ where
{
let query: Vec<String> = query
.to_lowercase()
.split(|c: char| !c.is_ascii_alphanumeric())
.split(char::is_whitespace)
.filter(|s| !s.is_empty())
.map(String::from)
.collect();
@ -1007,7 +1008,5 @@ fn build_matcher<T>(option: T) -> String
where
T: Display,
{
let mut matcher = option.to_string();
matcher.retain(|c| c.is_ascii_alphanumeric());
matcher.to_lowercase()
option.to_string().to_lowercase()
}