IL and DL commands should move cursor to left margin #3549

Open
opened 2026-01-30 23:24:07 +00:00 by claunia · 0 comments
Owner

Originally created by @j4james on GitHub (Aug 24, 2019).

Originally assigned to: @j4james on GitHub.

Environment

Windows build number: Version 10.0.18362.239

Steps to reproduce

Open a WSL shell and execute the following command:

printf "\e[10G\e[LLeft Margin?\n"

What that is doing is moving the cursor to column 10, inserting a line with the IL escape sequence, and then writing out "Left Margin?".

Expected behavior

The IL escape sequence should force the cursor to move back to column 1, so the text should appear at the left margin. This is what is looks in XTerm:

image

For further confirmation that this is the correct behaviour, this is what DEC STD 070 reference manual says regarding in the Insert Line escape sequence:

The Active Position is set to the Left Margin in the active line after execution of this control. The active line does not change.

Actual behavior

The cursor remains in column 10 after the insert, so the text appears in the wrong location:

image

The DL (Delete Line) escape sequence has the exact same problem. It should move the cursor back to the left margin, but in the Windows console it doesn't.

Originally created by @j4james on GitHub (Aug 24, 2019). Originally assigned to: @j4james on GitHub. # Environment ```none Windows build number: Version 10.0.18362.239 ``` # Steps to reproduce Open a WSL shell and execute the following command: printf "\e[10G\e[LLeft Margin?\n" What that is doing is moving the cursor to column 10, inserting a line with the [IL](https://vt100.net/docs/vt510-rm/IL.html) escape sequence, and then writing out "Left Margin?". # Expected behavior The IL escape sequence should force the cursor to move back to column 1, so the text should appear at the left margin. This is what is looks in XTerm: ![image](https://user-images.githubusercontent.com/4181424/63637587-a8625280-c675-11e9-9bd1-9b6a0e2f4abf.png) For further confirmation that this is the correct behaviour, this is what DEC STD 070 reference manual says regarding in the _Insert Line_ escape sequence: > The Active Position is set to the Left Margin in the active line after execution of this control. The active line does not change. # Actual behavior The cursor remains in column 10 after the insert, so the text appears in the wrong location: ![image](https://user-images.githubusercontent.com/4181424/63637590-bb752280-c675-11e9-9932-b74042e3034a.png) The DL (Delete Line) escape sequence has the exact same problem. It should move the cursor back to the left margin, but in the Windows console it doesn't.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3549