Copy and paste newline behavior changes after certain programs are launched
Environment
Microsoft Windows [Version 10.0.18362.239] Windows Terminal (Preview) Version: 0.3.2171.0
WSL Ubuntu 16.04.6 tmux 2.1 or htop 2.0.1 or vim
Steps to reproduce
- Launch WSL session in Windows Terminal
- Hit enter a few times to generate few lines of output
- Select the lines with mouse and right click to copy to clipboard:

- Paste the lines into a different program, note that 4 distinct lines are pasted, this is expected behavior.

- Launch vim (or other full screen application) inside the WSL window:

- Close vim using esc q! enter
- Highlight and copy the lines again using mouse and right click:

- Paste clipboard into different program, note that output is now on one line:

Expected behavior
Launching programs inside the terminal should not impact how/when newlines are preserved.
Actual behavior
Newlines are preserved when copying multi-line output. After certain (fullscreen?) applications are launched they no longer are preserved and pasted output ends up on a single line.
Isolation notes
Vim isn't the only program this happens with. At first I noticed copy inside tmux wasn't working the way I expected but then I noticed it happens just by launching and closing programs like vim and htop. I did a quick scan over the other copy paste newline bugs and none of them described this behavior but I might have missed one; sorry if this is a duplicate but I don't think it is.
i have tested this in multiple unreal engine 4 versions and have confirmed this is a problem that needs to be fixed. i have spent hours in hammer editor to find a way to isolate the problem code and realized we need the source code for netconf to continue development on a solution.
Microsoft please help us!
This is another version of #2275 actually. There's something about how the text enters the buffer that changes how it gets copied out.