Replies: 3 comments
-
Honestly our documentation on VT sequences is not great. You should really refer to the DEC manuals for any DEC sequences, or the XTerm documentation for most of the non-standard stuff. And quoting the DEC documentation,
And most modern terminals essentially treat the I would love one day for us to have a compatibility mode for something like ANSI.SYS and/or ANSI-BBS, but that's not likely to happen anytime soon, and I suspect that's not really what you want anyway. And the reason it "works" for you in conhost is because that was originally a bug that got fixed a few years back, and it often take years for OpenConsole fixes to make it into the inbox conhost. So I suspect you're only likely to see the correct behavior in a Windows 11 release. |
Beta Was this translation helpful? Give feedback.
-
I see, thanks James. It's a bit strange that VT doesn't have a way to save & restore cursor position only, but... it's not the only strange thing about VT. If it's a documentation issue, it would be nice to fix it and mention somewhere at that page that it is subject to change as VT support improves and one should check other sources to ensure compatibility - it can be frustrating to implement something according to the documentation, see it working in your dev environment and then discover that it only works due to a bug and will be broken in future releases. |
Beta Was this translation helpful? Give feedback.
-
I think that's a good idea. There's an existing issue in the documentation repo for the VT sequences page from 2019 (see MicrosoftDocs/Console-Docs#91), and that doesn't seem likely to be addressed any time soon. But a small update that just directs people to other sources would be a significant improvement in my opinion, and that's the sort of PR that could be reasonably easy for a volunteer contributor to do (although it's probably best to wait to see what the core devs have to say on the subject). |
Beta Was this translation helpful? Give feedback.
-
Windows Terminal version
WT 1.16.3463.0, OpenConsole 1.16.2212.12003
Windows build number
10.0.19045.2364
Other Software
No response
Steps to reproduce
https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#simple-cursor-positioning
https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#cursor-positioning
Unpack and run the cmd file in WT and OpenConsole:
test_cusror_position.zip
It sets color attributes and draws a few lines, saving and restoring cursor position along the way.
Expected Behavior
Since DECRC & ANSISYSRC restore cursor position only (according to the documentation above), I expect the color attributes to be applied to all the printed text.
It works as expected in conhost.exe 10.0.19041.1566 that comes with the OS:
Actual Behavior
Color attributes are reset.
OpenConsole 1.16.2212.12003:
WT 1.16.3463.0:
Beta Was this translation helpful? Give feedback.
All reactions