VT52 cursor left sequence conflicts with VT100 index sequence #210

Open
opened 2026-01-30 21:45:41 +00:00 by claunia · 0 comments
Owner

Originally created by @j4james on GitHub (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.

Originally created by @j4james on GitHub (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.
claunia added the Product-ConhostIssue-BugArea-VTResolution-Duplicate labels 2026-01-30 21:45:41 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#210