console_win: Try VIRTUAL_TERMINAL_PROCESSING aka modeVtOutput first and switch to alternate screen processing#26
Conversation
|
So the issue with switching to the VTE by default is that we also really need to use the extended key mode so that we can unambiguously get keystrokes. Otherwise it will be a reduction in functionality. Its on my list. |
|
I do like the approach here though! |
That's alright! Opting for VT emulation mode on output doesn't require you to opt in for input. A Windows console application can receive higher-fidelity |
|
Ah, cool. Yeah, using VTE only for output is actually a great idea. Let me look at this. |
|
Ah I remember now. ConEmu or one of the other terminal emulators didn't support this consistently. But maybe its better now. |
|
Whatever the case may be, I'm happy to help! Feel free to tag me on any issues or pull requests. 🙂 |
|
So I've implemented this in a better and more complete way: gdamore#692 It has an override ability for the alternate screen buffer, and leaves the original undamaged, and disables this on ConEmu which is frankly too broken to use in VT mode. (I tested the most recent release of ConEmu first.) |
|
Upstream tcell now only uses VT mode. For both output AND input! ConEmu sort of works, but I really don't recommend it (its kind of abandonware anyway) -- and all the other Windows emulators work well from what I've been able to test. I'd suggest exploring pulling in the new code. console_win in particular is utterly gone now, which does break Windows versions older than Windows 10 Creators Update (1704 I think) -- so it breaks Windows 8 and earlier, as well as Windows 10 older than 2017. I cannot imagine wanting to support such ancient builds of Windows, as they are fundamentally insecure. |
|
Btw, Windows Server 2016 should also work, but I don't have a way to test that. |
According to @DHowett (maintainer for the Windows Console subsystem and the Terminal)...
...so we should try to activate modeVtOutput regardless if
truecoloris set or not and switch then into the alternate screen mode (ported fromtscreenand terminfo ofxterm). Only then we can fix the ugly effect reported with the issue this PR tries to solve. With the change I wasn't able to reproduce this under Windows any longer.Still something is happening with the terminal style when
microis closed:micro, till the screen iscleared.Fixes micro-editor/micro#3073
@gdamore
This is most probably something which can/should be considered upstream too.
PS:
@zyedidia & @gdamore
Maybe there is a chance to bundle the competence and efforts again upstream so
microdoesn't need to rely on his own fork any longer. Just my thoughts. 😉