Escape sequences after exiting app with `run(mouse=False)`
TomJGooding opened this issue · 4 comments
I found this while experimenting with the new mouse
parameter added to App.run
in Textual v0.55.0.
Try exiting the app below and then moving the mouse in your terminal:
from textual.app import App
class ExampleApp(App):
pass
if __name__ == "__main__":
app = ExampleApp()
app.run(mouse=False)
Actually if you try moving your mouse around for a few seconds while the app is running, it will crash with:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 4: invalid start byte
Maybe worth knowing:
I also noticed the run_async
default behavior has changed. By default it now has mouse=False
, so launching as a regular TUI app result in the same error as @TomJGooding mentioned.
Of course, it's easily fixable but brought me some questions as I haven't noticed anything related in the latest release note. And noticed that, because we use it like asyncio.run(app.run_async())
instead of app.run()
because of the need for our own event loop (apart from that, I don't see anything wrong with it since it's a public interface)
Don't forget to star the repository!
Follow @textualizeio for Textual updates.