Recode incoming text on Windows before input event processing
See #3178.
This commit is contained in:
parent
0a14bf0549
commit
b6bbcb15f9
2 changed files with 7 additions and 1 deletions
|
|
@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
- Fixed a crash when removing an option from an `OptionList` while the mouse is hovering over the last option https://github.com/Textualize/textual/issues/3270
|
- Fixed a crash when removing an option from an `OptionList` while the mouse is hovering over the last option https://github.com/Textualize/textual/issues/3270
|
||||||
- Fixed a crash in `MarkdownViewer` when clicking on a link that contains an anchor https://github.com/Textualize/textual/issues/3094
|
- Fixed a crash in `MarkdownViewer` when clicking on a link that contains an anchor https://github.com/Textualize/textual/issues/3094
|
||||||
|
- Fixed application freeze when pasting an emoji into an application on Windows https://github.com/Textualize/textual/issues/3178
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -278,7 +278,12 @@ class EventMonitor(threading.Thread):
|
||||||
|
|
||||||
if keys:
|
if keys:
|
||||||
# Process keys
|
# Process keys
|
||||||
for event in parser.feed("".join(keys)):
|
#
|
||||||
|
# https://github.com/Textualize/textual/issues/3178 has
|
||||||
|
# the context for the encode/decode here.
|
||||||
|
for event in parser.feed(
|
||||||
|
"".join(keys).encode("utf-16", "surrogatepass").decode("utf-16")
|
||||||
|
):
|
||||||
self.process_event(event)
|
self.process_event(event)
|
||||||
if new_size is not None:
|
if new_size is not None:
|
||||||
# Process changed size
|
# Process changed size
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue