mark2devel / mark2

Minecraft Multi Server Wrapper Written in Python with Twisted; Pull Requests HIGHLY Encouraged, Collaborators Needed Discord: https://discord.gg/zymJygHNpv
Other
208 stars 44 forks source link

How do I get Microsoft terminal to clear the termianl when I CTRL+C out of a mark2 session? #160

Closed TomLewis closed 2 years ago

TomLewis commented 2 years ago

Ive used a few terminals, MobaXterm and Windows Terminal are my go-tos at present, Im really liking the lightweight Microsoft terminal, the only issue I have with it, is when I CTRL+C out of the mark2 session it keeps all the session text static on my screen and does not clear unless I run clear in terminal each time, this is quite hard to see in a screenshot so I have circled it.

This is after I have exited the session, the comandline is just slapped there, with all the text surrounding it as static text until I clear. This does not happen on MobaXterm. Is there a way to solve this with Windows Terminal or is this something that can be programmed into Mark2? Screenshot 2021-11-21 14 02 41

Column01 commented 2 years ago

There have been issues reported with Windows Terminal, it has been unable to display the dividers from URWID and also doesn't properly get cleared when you exit. Unfortunately its not something I can fix, its on the terminal's side to properly handle it. This also happens if you run mark2 inside of screen for example. See #129 for a workaround (using a wsl terminal inside windows terminal fixes it)

Column01 commented 2 years ago

Personally I use PuTTY

TomLewis commented 2 years ago

Yeah I used PuTTY since like 1999, but its so cumbersome and slow in comparison to a new age terminal. When I'm using MacOS iTerm2 is the best of the best that I have ever used, sadly there is no comparable alternative on windows, Windows terminal is the closest.

Can you explain to me what this tool that is being used is called, is it twisted? then Ill make a ticket on the Windows Terminal github, I do not have this issue on any other terminal.

Column01 commented 2 years ago

It's URWID that builds the GUI, the linked issue links to an open URWID issue about WSL and windows terminal issues (though I think its explicitly WSL that is the main issue in that case)

Column01 commented 2 years ago

I'm not entirely sure why windows terminal doesn't clear when it exits the UI, maybe URWID sends the escape character that normally would but the terminal ignores it. AFAIK it uses the ansi clear code. So if color codes also don't work, then that is probably it