string len is num of bytes
This commit is contained in:
parent
baccff8f99
commit
a0c704f36e
1 changed files with 1 additions and 7 deletions
|
|
@ -315,13 +315,7 @@ impl Handler {
|
|||
key_event.set_control_key(k);
|
||||
} else {
|
||||
let chr = match evt.name {
|
||||
Some(ref s) => {
|
||||
if s.len() == 1 {
|
||||
s.chars().next().unwrap()
|
||||
} else {
|
||||
'\0'
|
||||
}
|
||||
}
|
||||
Some(ref s) => s.chars().next().unwrap_or('\0'),
|
||||
_ => '\0',
|
||||
};
|
||||
if chr != '\0' {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue