string len is num of bytes
This commit is contained in:
parent
baccff8f99
commit
a0c704f36e
@ -315,13 +315,7 @@ impl Handler {
|
|||||||
key_event.set_control_key(k);
|
key_event.set_control_key(k);
|
||||||
} else {
|
} else {
|
||||||
let chr = match evt.name {
|
let chr = match evt.name {
|
||||||
Some(ref s) => {
|
Some(ref s) => s.chars().next().unwrap_or('\0'),
|
||||||
if s.len() == 1 {
|
|
||||||
s.chars().next().unwrap()
|
|
||||||
} else {
|
|
||||||
'\0'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_ => '\0',
|
_ => '\0',
|
||||||
};
|
};
|
||||||
if chr != '\0' {
|
if chr != '\0' {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user