Skip to content

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

Closed
@dandrei

Description

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).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions