Duplication and deletion of content on window resize. (Only on WSL - Ubuntu) #11582

Closed
opened 2026-01-31 02:51:41 +00:00 by claunia · 1 comment
Owner

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

Environment

Windows build number....: 10.0.19042
Windows Terminal version: 1.4.3243.0
Bash version............: 5.0.17(1)-release
WSL.....................: 2
Ubuntu..................: Ubuntu 20.04.1 LTS

Steps to reproduce

Issue 1

Open Windows Terminal
Open Wsl Ubuntu Tab
Type : echo "Line 1"  (press enter)
Type : echo "Line 2"  (press enter)
Type : echo "This is a very loooooooooooooooooooong string."
Try to resize window horizontally

Issue 2

Open Windows Terminal
Open Wsl Ubuntu Tab
Split tab in 2 (vertically)
Type(on both panes) : echo "Line 1"  (press enter)
Type(on both panes) : echo "Line 2"  (press enter)
Type(on both panes) : echo "This is a very looooooooong string."
Try to resize window horizontally

Issue 3

Open Windows Terminal
Open Wsl Ubuntu Tab
Type : echo "Line 1"  (press enter)
Type : echo "Line 2"  (press enter)
Type : echo "This is a very long string."
Try to resize window VERTICALLY till only 1 line is visible.

Expected behavior

The window should resize without duplication of text on text wrapping.

Actual behavior

Issue 1

Text keeps duplicating on each line break.
Text duplication : Both text before `$` & the typed text
Line duplication : Only the current active line duplicates.
Line deletion    : Only the line above active line gets deleted each time the active line gets out of line break.
Persistent       : Duplication is mostly not persistent.

Issue 2

Similar to behavior in issue 1
Line deletion    : Unpredictable
Persistent       : Duplication is persistent (but unpredictable).

Issue 3

Similar to behavior in issue 1 (except no line breaks needed)
Line deletion    : No.
Persistent       : Duplication is persistent.

Notes

Powershell and cmd has no issues.
This issue happens with split panes, powerline too.

Screenshots - Steps to reproduce
https://drive.google.com/drive/folders/1slLfsEOPh4QNHZw_9MQKlckJYwHcGOea?usp=sharing

Originally created by @umeshmk on GitHub (Nov 25, 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 Windows build number....: 10.0.19042 Windows Terminal version: 1.4.3243.0 Bash version............: 5.0.17(1)-release WSL.....................: 2 Ubuntu..................: Ubuntu 20.04.1 LTS # Steps to reproduce **Issue 1** Open Windows Terminal Open Wsl Ubuntu Tab Type : echo "Line 1" (press enter) Type : echo "Line 2" (press enter) Type : echo "This is a very loooooooooooooooooooong string." Try to resize window horizontally **Issue 2** Open Windows Terminal Open Wsl Ubuntu Tab Split tab in 2 (vertically) Type(on both panes) : echo "Line 1" (press enter) Type(on both panes) : echo "Line 2" (press enter) Type(on both panes) : echo "This is a very looooooooong string." Try to resize window horizontally **Issue 3** Open Windows Terminal Open Wsl Ubuntu Tab Type : echo "Line 1" (press enter) Type : echo "Line 2" (press enter) Type : echo "This is a very long string." Try to resize window VERTICALLY till only 1 line is visible. # Expected behavior The window should resize without duplication of text on text wrapping. # Actual behavior **Issue 1** Text keeps duplicating on each line break. Text duplication : Both text before `$` & the typed text Line duplication : Only the current active line duplicates. Line deletion : Only the line above active line gets deleted each time the active line gets out of line break. Persistent : Duplication is mostly not persistent. **Issue 2** Similar to behavior in issue 1 Line deletion : Unpredictable Persistent : Duplication is persistent (but unpredictable). **Issue 3** Similar to behavior in issue 1 (except no line breaks needed) Line deletion : No. Persistent : Duplication is persistent. # Notes `Powershell` and `cmd` has no issues. This issue happens with split panes, powerline too. **Screenshots - Steps to reproduce** https://drive.google.com/drive/folders/1slLfsEOPh4QNHZw_9MQKlckJYwHcGOea?usp=sharing
claunia added the Resolution-By-DesignNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 02:51:41 +00:00
Author
Owner

@DHowett commented on GitHub (Nov 25, 2020):

Thanks for the reports! Unfortunately, while I know that this is a really strange thing, it's by design. What's happening here is that bash is receiving the "window size changed" event and responding by re-printing the prompt. It forgets where the cursor is, or fails to move it properly, and ends up duplicating text all over the place.

This is what it looks like in gnome-terminal (which isn't running any of our code)

image

@DHowett commented on GitHub (Nov 25, 2020): Thanks for the reports! Unfortunately, while I know that this is a really strange thing, it's _by design_. What's happening here is that bash is receiving the "window size changed" event and responding by re-printing the prompt. It forgets where the cursor is, or fails to move it properly, and ends up duplicating text all over the place. This is what it looks like in gnome-terminal (which isn't running any of our code) ![image](https://user-images.githubusercontent.com/189190/100271149-dafc9a00-2f0d-11eb-9653-838ba1bc4d4d.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11582