Terminal does not support tabs in VT100 ANSI sequences properly #8451

Closed
opened 2026-01-31 01:29:47 +00:00 by claunia · 5 comments
Owner

Originally created by @ThomasMConnors on GitHub (May 21, 2020).

-->

Environment

Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0

Any other software?

Windows Terminal
Version: 1.0.1401.0

Steps to reproduce

Compile and run MS Docs example "Example of Select Anniversary Update Features" on https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#example-of-select-anniversary-update-features

Expected behavior

Draws using VT100 ANSI Escape sequences.

Actual behavior

Looks like VT100 sequence to move cursor using tabs works only on current line and does not move to next line when there are no more tab stops on line.

This works fine on Powershell and CMD when not inside Terminal and fails with Powershell and CMD when inside Terminal.

Originally created by @ThomasMConnors on GitHub (May 21, 2020). --> # Environment Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0 Any other software? Windows Terminal Version: 1.0.1401.0 # Steps to reproduce Compile and run MS Docs example "Example of Select Anniversary Update Features" on https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#example-of-select-anniversary-update-features # Expected behavior Draws using VT100 ANSI Escape sequences. # Actual behavior Looks like VT100 sequence to move cursor using tabs works only on current line and does not move to next line when there are no more tab stops on line. This works fine on Powershell and CMD when *not* inside Terminal and fails with Powershell and CMD when inside Terminal.
claunia added the Resolution-Duplicate label 2026-01-31 01:29:47 +00:00
Author
Owner

@DHowett commented on GitHub (May 21, 2020):

I believe this is by design for VT applications. @j4james worked in this area recently...

@DHowett commented on GitHub (May 21, 2020): I believe this is by design for VT applications. @j4james worked in this area recently...
Author
Owner

@j4james commented on GitHub (May 21, 2020):

This is essentially covered by issue #3177. There are a number of operations where our handling of the delayed eol wrap flag isn't correct. In most cases the problem is that we aren't clearing the flag when we should be, but the TAB control is one case where we are clearing it but we shouldn't be.

The reason this works in older versions of conhost is because there used to be a bug that allowed the TAB control to wrap when it shouldn't have, which suppressed the effects of the delayed eol wrap problem. So fixing the one bug just ended up uncovering another one.

@j4james commented on GitHub (May 21, 2020): This is essentially covered by issue #3177. There are a number of operations where our handling of the _delayed eol wrap_ flag isn't correct. In most cases the problem is that we aren't clearing the flag when we should be, but the `TAB` control is one case where we _are_ clearing it but we _shouldn't_ be. The reason this works in older versions of conhost is because there used to be a bug that allowed the `TAB` control to wrap when it shouldn't have, which suppressed the effects of the _delayed eol wrap_ problem. So fixing the one bug just ended up uncovering another one.
Author
Owner

@j4james commented on GitHub (May 21, 2020):

I should add that it's probably not a great idea to rely on this behaviour in a demo. Some earlier DEC terminals actually matched our current behaviour, as does the DEC STD 070 manual. And while most modern terminal emulators follow the newer DEC behaviour, not everyone does.

@j4james commented on GitHub (May 21, 2020): I should add that it's probably not a great idea to rely on this behaviour in a demo. Some earlier DEC terminals actually matched our current behaviour, as does the DEC STD 070 manual. And while most modern terminal emulators follow the newer DEC behaviour, not everyone does.
Author
Owner

@DHowett commented on GitHub (May 21, 2020):

Thanks for weighing in. This is one thing we are likely to eat crow for when it hits the general public in conhost. Alas!

/dup #3177 for the issue, but also, counterbug #3168.

@DHowett commented on GitHub (May 21, 2020): Thanks for weighing in. This is one thing we are likely to eat crow for when it hits the general public in conhost. Alas! /dup #3177 for the issue, but also, counterbug #3168.
Author
Owner

@ghost commented on GitHub (May 21, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (May 21, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8451