Clipboard gets overridden when pasting to a tab with a previous selection with right click or Shift+Insert, when copy-on-select is enabled #22285

Closed
opened 2026-01-31 08:08:51 +00:00 by claunia · 2 comments
Owner

Originally created by @dandrei on GitHub (Sep 13, 2024).

Windows Terminal version

1.20.11781.0

Windows build number

10.0.19045.4894

Other Software

No response

Steps to reproduce

  1. Copy-on-select needs to be enabled.
  2. Go Terminal and select some text with your mouse. Don't deselect it by performing another click.
  3. Switch to another context, which can be another Terminal tab or an outside application like Notepad, and copy some other text to the clipboard.
  4. Optional: Test that the clipboard contains the new copied text by performing a simple paste in that context.
  5. Switch back to the original Terminal tab, and try to paste the new selection by doing a right click or Shift+Insert (Ctrl+V doesn't exhibit this bug).
  6. Observe that the text that gets pasted isn't the one you last explicitly copied, but is instead the original selection.

Expected Behavior

Copy-on-select should only happen when you do the selection. In Terminal you select a piece of text, and it gets put onto the clipboard. If you switch to another context, copy some other text to the clipboard, then switch back to Terminal to paste it with either the mouse or Shift+Insert, what should be pasted is the thing you last copied onto the clipboard.

Actual Behavior

When you switch to a Terminal window where you previously made a selection, and try to paste from the clipboard by either doing a right click or pressing Shift+Insert, Terminal treats the existing selection in that tab as a new "copy-on-select" event, overriding your existing clipboard content (whatever you copied before trying to paste).

Originally created by @dandrei on GitHub (Sep 13, 2024). ### Windows Terminal version 1.20.11781.0 ### Windows build number 10.0.19045.4894 ### Other Software _No response_ ### Steps to reproduce 1. Copy-on-select needs to be enabled. 2. Go Terminal and select some text with your mouse. Don't deselect it by performing another click. 3. Switch to another context, which can be another Terminal tab or an outside application like Notepad, and copy some other text to the clipboard. 4. Optional: Test that the clipboard contains the new copied text by performing a simple paste in that context. 5. Switch back to the original Terminal tab, and try to paste the new selection by doing a right click or Shift+Insert (Ctrl+V doesn't exhibit this bug). 6. Observe that the text that gets pasted isn't the one you last explicitly copied, but is instead the original selection. ### Expected Behavior Copy-on-select should only happen when you do the selection. In Terminal you select a piece of text, and it gets put onto the clipboard. If you switch to another context, copy some other text to the clipboard, then switch back to Terminal to paste it with either the mouse or Shift+Insert, what should be pasted is the thing you last copied onto the clipboard. ### Actual Behavior When you switch to a Terminal window where you previously made a selection, and try to paste from the clipboard by either doing a right click or pressing Shift+Insert, Terminal treats the existing selection in that tab as a new "copy-on-select" event, overriding your existing clipboard content (whatever you copied before trying to paste).
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 08:08:52 +00:00
Author
Owner

@similar-issues-ai[bot] commented on GitHub (Sep 13, 2024):

We've found some similar issues:

  • #14713 , similarity score: 82%

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@similar-issues-ai[bot] commented on GitHub (Sep 13, 2024): We've found some similar issues: - #14713 , similarity score: 82% If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue. > Note: You can give me feedback by 👍 or 👎 this comment.
Author
Owner

@dandrei commented on GitHub (Sep 13, 2024):

Looks like there are other issues mentioning the same bug, #14713 #14464 #14635.

@dandrei commented on GitHub (Sep 13, 2024): Looks like there are other issues mentioning the same bug, #14713 #14464 #14635.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22285