Skip to content

Automatically copy selection to clipboard is no longer working correctly with tmux #14464

Open
@andyneff

Description

Windows Terminal version

1.15.2875.0

Windows build number

10.0.22621.819

Other Software

tmux

  • 3.3a in Fedora Remix WSL
  • 1.8 when SSHed into CentOS 7
  • 3.2a on Ubuntu 22.04 WSL

Steps to reproduce

  1. Enable "Automatically copy selection to clipboard"
    image
    "copyFormatting": "all",
    "copyOnSelect": true,
  1. Start tmux
  2. I use the mouse to Scroll. If you need help it's: Ctrl + b then : and type set-window-option -g mouse on and press enter (Unless you are on tmux 1.8 and it's a lot more complicated)
  3. Scroll up in tmux buffer
  4. Press Shift + Left Click and drag on the text you want to Select. Holding Shift is important because this is doing a normal terminal "select" not a fancy Tmux select (which copies to tmuxes internal clipboard, not the real Windows one)
    image
  5. Scroll back down to the bottom so you can get out of scrolling mode
    image
  6. Paste in terminal (Shift right click)
  7. Now paste in terminal or any other application, and you will have the wrong text pasted

In this case it will paste 85, not the 10 I actually selected

Expected Behavior

This used to work, it was beautiful, and everything was bearable. The text I selected before scrolling back down was in my clipboard, and it pasted correctly. Now the "selection" was in same physical space but no longer over the text I initially selected, but this never mattered and not something I'd expect to change behavior

I expect it to paste 10 like it was until very recently

Actual Behavior

It pasted 85

Terminal is deciding to copy again at paste time.

Step 4 is important. Before step 7, if you paste outside of terminal, you will see that after step 5, the text in the Windows Clipboard is indeed correct, even after step 6. But as soon as I go to paste in Terminal, it "re copies" where the select text is and breaks everything.

It's also important

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)In-PRThis issue has a related PRIssue-BugIt either shouldn't be doing this or needs an investigation.Priority-1A description (P1)Product-TerminalThe new Windows Terminal.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions