Replace non-ASCII characters in text input with '?'
This matches `SimpleGraphics` behavior and prevents a crash that can happen if PoB tries to delete a non-ASCII character. Fixes #9.
This commit is contained in:
1 parent
51e6881cb0
commit
50d4b4b09c
2 files changed
+6
-1
No files matched your search
@@ -133,6 +133,7 @@ impl PoBMode {
|
||||
}
|
||||
}
|
||||
AppEvent::CharacterInput { ch } => {
|
||||
let ch = if ch.is_ascii() { ch } else { '?' };
|
||||
self.lua_instance
|
||||
.handle_event(PoBEvent::Char(ch), &mut ctx)?;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user