From f141c3ce5ce3ae57e9fe736b85e24c90ce49457d Mon Sep 17 00:00:00 2001 From: Hojjat Date: Tue, 31 Mar 2026 16:10:59 -0600 Subject: [PATCH] fix: support Unicode/non-ASCII scripts in combo_box search --- widget/src/combo_box.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/widget/src/combo_box.rs b/widget/src/combo_box.rs index 785185c7..a5bf361d 100644 --- a/widget/src/combo_box.rs +++ b/widget/src/combo_box.rs @@ -977,7 +977,8 @@ where { let query: Vec = 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(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() }