Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VT52 cursor left sequence conflicts with VT100 index sequence #144

Closed
j4james opened this issue Mar 31, 2018 · 4 comments
Closed

VT52 cursor left sequence conflicts with VT100 index sequence #144

j4james opened this issue Mar 31, 2018 · 4 comments
Labels
Area-VT Virtual Terminal sequence support Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Conhost For issues in the Console codebase Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@j4james
Copy link
Collaborator

j4james commented Mar 31, 2018

  • Your Windows build number:

Microsoft Windows [Version 10.0.16299.309]

  • What you're doing and what's happening:

I was trying to use the IND (index) sequence, ESC D, which is defined in the VT100 manual as follows:

This sequence causes the active position to move downward one line without changing column position. If the active position is at the bottom margin, a scroll up is performed.

But instead of moving down a line, it moved left. Example test case:

printf "  x\033D\033D\033Dy\n"

In a Windows 10 bash console, this produces the following output:

y x

In a Linux console it works as expected:

  x
  
  
   y

I assume this is because the sequence is being interpreted as a VT52 cursor left command, but typically those VT52 sequences would only be active on a VT100 compatible terminal when the DECANM mode had been set to VT52, if at all.

  • What's wrong / what should be happening instead:

I would expect the ESC D sequence to be interpreted as a VT100 index command, and not a VT52 cursor left command.

I understand that not every VT100 sequence is going to be supported, but when that is the case, I would expect the sequence to be ignored completely. And to avoid conflicts like this, I think it would be preferable if any supported VT52 sequences were only active when the VT52 compatibility mode was actually enabled.

@WSLUser
Copy link
Contributor

WSLUser commented Apr 25, 2018

While we're at it, I'm wondering if there can be a user setting in form of a drop-down menu to choose between different VT sequences. For example here we'd need a setting for VT100 and another setting for VT52. Choosing the VT would load the behavior associated to it and fall back to what conhost considers default in whatever behavior implementations haven't yet been implemented for a particular VT sequence.

@zadjii-msft
Copy link
Member

That'd be great to enable support for different term levels, but I can't see a world where we get to that in any sort of reasonable time frame. Just way too far down a really long backlog :/

@WSLUser
Copy link
Contributor

WSLUser commented Apr 25, 2018

I didn't want to mention it because it would be better to get this natively "under the hood" but a viable, potentially faster solution may come from the new set of APIs you guys are building if anything in there is able to be tweaked to allow this kind of thing from a terminal such as Konsole that will utilize these new APIs (no I don't expect Konsole itself to support it though it'd be pretty cool if KDE folks implemented it as well). Also, I did put the caveat "default to..." because of course we'd all be skeletons by the time every term level was fully supported.

I know you guys are trying to make the console look like xterm but it may be easier trying to reproduce a project like eterm or LXTerminal which are xtermish but with less code than xterm proper.

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa
Copy link
Member

miniksa commented May 29, 2019

This is #976. I'm going to close this one as the other one is marked up more appropriately and they'll get linked by talking about this.

@miniksa miniksa closed this as completed May 29, 2019
@miniksa miniksa added Area-VT Virtual Terminal sequence support Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Conhost For issues in the Console codebase Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. labels May 29, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-VT Virtual Terminal sequence support Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Conhost For issues in the Console codebase Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

4 participants