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
+5
-1
@@ -2,6 +2,10 @@
|
||||
|
||||
## [Unreleased] - ReleaseDate
|
||||
|
||||
### Changed
|
||||
|
||||
- Replace non-ASCII characters in text input with '?'
|
||||
|
||||
## [0.2.7] - 2025-11-02
|
||||
|
||||
### Added
|
||||
@@ -111,8 +115,8 @@
|
||||
- First release
|
||||
|
||||
<!-- next-url -->
|
||||
[Unreleased]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.7...HEAD
|
||||
|
||||
[Unreleased]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.7...HEAD
|
||||
[0.2.7]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.6...v0.2.7
|
||||
[0.2.6]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.5...v0.2.6
|
||||
[0.2.5]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.4...v0.2.5
|
||||
|
||||
@@ -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