From 432a487d3230a71cfc286ec3fa94248f4f710d83 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Wed, 15 Dec 2021 16:52:21 +0900 Subject: [PATCH] WIP allow non-ascii chars for password input --- src/display.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/display.rs b/src/display.rs index f1a20ac..a99950a 100644 --- a/src/display.rs +++ b/src/display.rs @@ -211,11 +211,7 @@ impl EventHandler for MPDDisplay { } fn text_input_event(&mut self, _ctx: &mut Context, character: char) { - if !self.is_initialized - && self.opts.enable_prompt_password - && character.is_ascii() - && !character.is_ascii_control() - { + if !self.is_initialized && self.opts.enable_prompt_password && !character.is_control() { if self.opts.password.is_none() { let s = String::from(character); self.opts.password = Some(s);