fix: support Unicode/non-ASCII scripts in combo_box search
This commit is contained in:
parent
9b2857083e
commit
f141c3ce5c
1 changed files with 3 additions and 4 deletions
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue