Issue with line-wrapped tabstops after resizing the window #6556

Open
opened 2026-01-31 00:41:37 +00:00 by claunia · 0 comments
Owner

Originally created by @ethanherbertson on GitHub (Feb 20, 2020).

Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.9.433.0

Steps to reproduce

  1. From WSL, echo a line of text containing a literal tab character, long enough to cause the tab character to render AFTER Terminal line-wraps the line (e.g. on a second line).
  2. Resize Terminal, increasing its width enough so that the whole line of text now fits on a single line
  3. Print the same line of text again.

Expected behavior

The second printing of the text is printed in a single line, with the tab producing the expected amount of horizontal whitespace.

Actual behavior

The line of text is corrupted, with the tab consuming too much horizontal whitespace (= the full remaining width of the window - 1), causing the line to sill be wrapped across multiple lines as well.

I would assume this is related to the various problems listed in #4200, but I don't see this specifically mentioned (though some of the issues listed there are beyond my ability to grok).

Fully fleshed-out example:

Assuming an initial window width of approximately 80 characters, here's an example command that will print a suitable line:

echo -e "123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 Hardtab:\t123456789 123456789 123456789 123456789"

On a smallish window, that renders something like this:

image

If you then resize the window wide enough that the output line is reflowed onto a single line...

image

... and then re-run the echo you get something clearly quite wrong:

image

Originally created by @ethanherbertson on GitHub (Feb 20, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 10.0.18362.0 Windows Terminal version (if applicable): 0.9.433.0 ``` # Steps to reproduce 1. From WSL, echo a line of text containing a literal tab character, long enough to cause the tab character to render AFTER Terminal line-wraps the line (e.g. on a second line). 2. Resize Terminal, increasing its width enough so that the whole line of text now fits on a single line 3. Print the same line of text again. # Expected behavior The second printing of the text is printed in a single line, with the tab producing the expected amount of horizontal whitespace. # Actual behavior The line of text is corrupted, with the tab consuming too much horizontal whitespace (= the full remaining width of the window - 1), causing the line to sill be wrapped across multiple lines as well. I would assume this is related to the various problems listed in #4200, but I don't see this specifically mentioned (though some of the issues listed there are beyond my ability to grok). Fully fleshed-out example: Assuming an initial window width of approximately 80 characters, here's an example command that will print a suitable line: ```bash echo -e "123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 Hardtab:\t123456789 123456789 123456789 123456789" ``` On a smallish window, that renders something like this: ![image](https://user-images.githubusercontent.com/6392396/74988047-5f137580-5402-11ea-86d5-289e54c78b07.png) If you then resize the window wide enough that the output line is reflowed onto a single line... ![image](https://user-images.githubusercontent.com/6392396/74988084-7b171700-5402-11ea-80cb-f74f1522f87b.png) ... and then re-run the echo you get something clearly quite wrong: ![image](https://user-images.githubusercontent.com/6392396/74988134-a6016b00-5402-11ea-8c48-5c6d431b6a09.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6556