ANSI control code for line wrapping not supported? #11585

Open
opened 2026-01-31 02:51:47 +00:00 by claunia · 0 comments
Owner

Originally created by @patriksvensson on GitHub (Nov 25, 2020).

Not sure if I'm doing something wrong or not, but I can't get line wrapping to work, which wants me to know whether or not DECAWM support is supported at all in Windows Terminal.

I'm not sure if I'm doing something wrong, but it feels like I've tried everything I can think of.

Environment

Windows build number: 10.0.19041.0
Windows Terminal version (if applicable): 1.4.3243.0

Steps to reproduce

Open a PowerShell prompt and run the following script:

# Disable line wrapping
Write-Host "$([char]27)[?7l" -NoNewline

# First line
For ($i=0; $i -lt $host.UI.RawUI.BufferSize.Width ; $i++) {
    Write-Host '1' -NoNewline
}

# New line
Write-Host ""

# Second line
For ($i=0; $i -lt $host.UI.RawUI.BufferSize.Width; $i++) {
    Write-Host '2' -NoNewline
}

Expected behavior

I expect lines to "stay in place" without wrapping when I resize the window.

11111111111111111111111111111111111
22222222222222222222222222222222222

Actual behavior

Lines autowrap when I resize the window.

1111111111111111111111111111111111122222222222222222222222222222222222
Originally created by @patriksvensson on GitHub (Nov 25, 2020). Not sure if I'm doing something wrong or not, but I can't get line wrapping to work, which wants me to know whether or not [DECAWM support](https://vt100.net/docs/vt510-rm/DECAWM.html) is supported at all in Windows Terminal. I'm not sure if I'm doing something wrong, but it feels like I've tried everything I can think of. # Environment ```none Windows build number: 10.0.19041.0 Windows Terminal version (if applicable): 1.4.3243.0 ``` # Steps to reproduce Open a PowerShell prompt and run the following script: ```powershell # Disable line wrapping Write-Host "$([char]27)[?7l" -NoNewline # First line For ($i=0; $i -lt $host.UI.RawUI.BufferSize.Width ; $i++) { Write-Host '1' -NoNewline } # New line Write-Host "" # Second line For ($i=0; $i -lt $host.UI.RawUI.BufferSize.Width; $i++) { Write-Host '2' -NoNewline } ``` # Expected behavior I expect lines to "stay in place" without wrapping when I resize the window. ``` 11111111111111111111111111111111111 22222222222222222222222222222222222 ``` # Actual behavior Lines autowrap when I resize the window. ``` 1111111111111111111111111111111111122222222222222222222222222222222222 ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11585