-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-line copies from tmux scrollback buffer strips newlines #13898
Comments
There are a few fuzzy things that probably need to be described. I have been pulling my hair out on this one too...
In my testing, holding shift while right clicking always strips out the newlines, even in a cmd.exe shell! If I select the text with shift+lmb then copy with the keyboard shortcut everything is good. Also, doing a block select works (holding alt+shift). |
Yes, yes, and yes
I hold shift and select with the left mouse button. Once text is selected, Anything with the right mouse button attempts to paste copied content. |
I guess my issue is different, then! If you search through the terminal issues for "paste" you will find tons of problems about newlines. But out of solidarity I tried to reproduce your issue :-). I installed a fresh debian in WSL. First I tried stretch tmux (2.3-4) but failed to reproduce. Then I added bullseye-backports to /etc/apt/sources.list and updated:
My debian-foo is rusty so I'm not really sure how you got 3.3a-1~bpo11+1 installed into stretch. I assume you build it from source? So I tried:
How I tried to reproduce:
The only time I got added spaces was when I accidentally copied the line counter where tmux prints Maybe make a video? You can record pretty quickly with xbox game bar (win+g key). Good luck! |
Pretty sure this looks like /dup #8976 edit: yes it definitely is |
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Windows Terminal version
1.14.2281.0
Windows build number
10.0.19044.0
Other Software
tmux 3.3a-1~bpo11+1 (inside WSL2, from Debian bullseye-backports)
Steps to reproduce
Scrolling up a full page or more is the easiest way to observe this, but careful observation shows that when scrolling less than a page up the scrollback buffer (so some originally viewable text is retained), copying the text that was originally viewable retains newlines, while copying text retrieved from the scrollback buffer strips the newlines. In fact, doing a multi-line selection across the boundary of original view pane results in stripped newlines only up until the original viewable content is encountered, at which point newlines are retained.
Expected Behavior
Copying multi-line selections through Terminal always retains newlines, even from alternate buffer and tmux scrollback buffer
Actual Behavior
New lines are stripped from multi-line selection copied text
The text was updated successfully, but these errors were encountered: