Issue 1:
Environment

Windows build number: Version 10.0.18362.175
Windows Terminal version (if applicable): 0.2.1831.0

Steps to reproduce

Set the HKCU\Console\VirtualTerminalLevel registry entry to 1, to enable support for VT escape sequences by default.

Makes sure the initialCols option in the Windows Terminal profile is set to 120.

Open a cmd shell in the Windows Terminal (this can't be a WSL bash shell - it must be something that would usually not have VT support enabled without the registry setting).

Run the following Python script:

import sys
sys.stdout.write('X'*(120-10))
sys.stdout.write('\033[1;34;47mHello\033[m\n')

Expected behavior

I'd expect this to display 110 X's followed by the word Hello, in blue on white, on the same line. This is what it looks like in a regular console cmd shell.

Actual behavior

What actually happens in the Windows Terminal is the Hello is displayed on the following line.

I don't have a good understanding of how the conpty stuff works, but my theory is that the escape sequences aren't actually being processed initially, and are just written out to the screen as literal characters. As a result the Hello is forced to wrap onto the next line, because there isn't enough space remaining. This screen structure is then passed through conpty somehow, at which point the escape sequences are processed and the text colors changed. But by that stage the wrapping has already taken effect, so the text is in the wrong place.

It's easier to see what's going on if you apply PR #1964 first. In that case, the ESC character gets translated to a ← when it isn't initially interpreted as an escape sequence. The other side of the conpty pipe then doesn't get a second chance to process those values as an escape sequence, so you just see the raw characters being written out.

This may be a good reason to reject PR #1964 for now, since it's clearly making the situation worse, but I think the real issue is in the conpty code, and if that were fixed then the PR might well be safe to merge.

Issue 2:
Environment

Windows build number: Microsoft Windows [Version 10.0.18362.295]
Windows Terminal version (if applicable): Version: 0.4.2382.0

Any other software?

Steps to reproduce

say we have

"

Line 1

Line 2

Line 3

"

on screen.

use Mouse to select multiple lines in the windows terminal and right click (or ctrl + c). Then paste it into either a text editor such as sublime in windows or paste back into the terminal using right click again.

all the lines become one line with lots of spaces adding in between. such as

"Line 1 SPACE SPACE SPACE SPACE SPACE SPACE Line 2 SPACE SPACE SPACE SPACE SPACE SPACE SPACE SPACE SPACE Line 3 "

Expected behavior

The right output should be

"

Line 1\newline

Line 2\newline

Line 3\newline

"

This makes it really really hard to use windows terminal, since we do need to copy and paste multiple lines a lot. Say people ask you send them your stuffs in some linux env, you open the file, then you want to just be able to select lines and copy them, then paste into an email/chat app in windows. Now, all lines are becoming just one line, which is bad..

Actual behavior

all the lines become one line with lots of spaces adding in between. such as

"Line 1 SPACE SPACE SPACE SPACE SPACE SPACE Line 2 SPACE SPACE SPACE SPACE SPACE SPACE SPACE SPACE SPACE Line 3 "