Multi-line paste with WSL omits and splices together lines #10833
Labels
Area-Input
Related to input processing (key presses, mouse, etc.)
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Priority-2
A description (P2)
Product-Terminal
The new Windows Terminal.
Resolution-External
For issues that are outside this codebase
Milestone
Windows Terminal version (or Windows build number)
Windows Terminal version 1.9.1942.0, WSL version 1, Windows 10 21H1 Build 19043.985
Other Software
No response
Steps to reproduce
Paste the following 50 lines of text into your bash prompt using Ctrl + Shift + V, with the terminal height set to the default of 30 rows:
Expected Behavior
No response
Actual Behavior
It only pastes as many lines as the height of the terminal, and then skips everything until the last line. For instance, if I paste into the terminal when it's 30 lines high (the default), it prints line 1 through line 30 and then skips to line 50:
If I then maximize, it looks fine... except that line 9 is incorrectly printed as "line 90":
and if I then re-minimize, it incorrectly prints line 2 as line 22, line 3 as line 33, ... and line 9 as line 99. There was no line 99 in my original text, so it seems to be splicing together bits of different lines.
Interestingly, if I copy-paste the terminal contents into Sublime Text, it pastes the incorrect text, including the line 99 thing:
Another test I tried is pasting the original "line 1", "line 2", ... "line 50" text when the terminal is 30 lines tall, and then expanding it to 32 lines. Now it prints lines 31 and 32 before skipping to line 50. It also incorrectly prints line 8 as "line 80" and line 9 as "line 90" - the 0 is probably coming from "line 10" immediately below:
The text was updated successfully, but these errors were encountered: