RasmusLindroth / tut

TUI for Mastodon with vim inspired keys
https://tut.anv.nu
MIT License
449 stars 29 forks source link

v1.0.0 - pressing 'Q' to quit, partially breaks the terminal emulator #131

Closed toxision closed 2 years ago

toxision commented 2 years ago

Unfortunately version 1.0.0 does something strange when quitting.

OS: Linux Mint 20.3 (XFCE) shell: bash 5.0.17 terminal emulator: terminator and xfce4-terminal build: tut-amd64-static

So when pressing 'Q' the following happens:

  1. tut is still shown (but not running anymore)
  2. command prompt is shown either beneath tut or somewhere randomly on the screen, the latter I wasn't exactly able to reproduce
  3. the command input becomes 'invisible', so perhaps same as background color or something like that, commands are definitely trigger the appropriate action, but not even marking the section does reveal any input command

Doing: reset && . ~/.bashrc works fine and brings everything back as it was before launching tut

If there's any additional input I could provide, please let me know.

Screenshot is showing the little visibility this issue is giving.

Screenshot_2022-05-05_22-59-37 (Note: "😎 [ ~ ]" might look strange but is indeed my regular prompt 😉)

RasmusLindroth commented 2 years ago

Oh, it's because I call os.Exit(0) instead of stopping tview as the previous version did. I will make a new version tomorrow. Thank you for the issue 😎

DhruvaSambrani commented 2 years ago

Yes, this looks like the terminal drawing library not cleaning properly. Atleast, I have seen the same issue when this happened in other contexts.

RasmusLindroth commented 2 years ago

Thank you for the issue. It's fixed in the latest release :)