Merge pull request #388 from rtfeldman/fix-macos-editor

Fix backspace bug on macOS editor
This commit is contained in:
Richard Feldman 2020-06-22 20:10:43 -04:00 committed by GitHub
commit 796396e10c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,11 +129,11 @@ fn run_event_loop() -> Result<(), Box<dyn Error>> {
..
} => {
match ch {
'\u{8}' => {
// In Linux, we get one of these when you press
// backspace, but in macOS we don't. In both, we
'\u{8}' | '\u{7f}' => {
// In Linux, we get a '\u{8}' when you press backspace,
// but in macOS we get '\u{7f}'. In both, we
// get a Back keydown event. Therefore, we use the
// Back keydown event and ignore this, resulting
// Back keydown event and ignore these, resulting
// in a system that works in both Linux and macOS.
}
'\u{e000}'..='\u{f8ff}'