PowerShell / Win32-OpenSSH

Win32 port of OpenSSH
7.38k stars 759 forks source link

Copying output from tmux omits newlines and pads with whitespaces #1579

Open Trolldemorted opened 4 years ago

Trolldemorted commented 4 years ago

"OpenSSH for Windows" version ssh.exe from https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v8.1.0.0p1-Beta

Server OperatingSystem Ubuntu 1804 LTS

Client OperatingSystem W10 N 1909

What is failing If you copy a tmux session's output, all newlines are removed and padding whitespaces are added.

Copied text in putty:

benni@majorpurpose:~$ whoami
benni
benni@majorpurpose:~$

Copied text in openssh:

benni@majorpurpose:~$ whoami                                                                                                                                                                                                                                                   benni                                                                                                                                                                                                                                                                          benni@majorpurpose:~$

As you can see, all newlines have been stripped, and there are a lot of padding whitespaces.

bagajjal commented 4 years ago

@DHowett - Can you please have a look as we directly pass the incoming buffer to console.

maertendMSFT commented 4 years ago

Ping @DHowett :)

DHowett commented 4 years ago

Hey there, sorry about that! I've not yet nailed my notification settings, so it results in comments in the PowerShell organization going to my personal e-mail account instead of my work one. :smile:

So, this one's a little complicated... and it's an issue visible in vim as well as tmux. Writing off, or up to, the righthand side of the screen can make conhost think that a line has wrapped and that a selection that includes the "line break" should be copied as a single line.

However, I can't reproduce this...

Can you share your tmux config?

Trolldemorted commented 4 years ago

Sure!

set -g mouse on
Trolldemorted commented 3 years ago

This issue will have been open for an entire year soon, are there any news?

Do you need further help to reproduce it?

bagajjal commented 3 years ago

@DHowett - Could you please follow up.

Trolldemorted commented 2 years ago

I don't want to annoy you, but this is literally the only thing that stops me from uninstalling putty :)

@DHowett do you need anything regarding this issue? Can you estimate when a fix will be released? Is there anything we can help you with?