Skip to content

Right click paste also does a copy with copyOnSelect #19942

@csdivad

Description

@csdivad

Windows Terminal version

1.23.20211.0

Windows build number

10.0.26100.7840

Other Software

No response

Steps to reproduce

  1. Set copyOnSelect to true.
  2. Open a shell in Terminal (PowerShell for example).
  3. Select a text in that shell to copy it. Don't click into the window afterwards to ensure the selection remains.
  4. Switch to another application (notepad recommended for the next step). The selected text should remain selected.
  5. Test that the selected text is on the clipboard and then overwrite it by copying some other text.
  6. Switch back to the terminal with alt+tab and do a paste with right click. Or just right click into the Terminal text area which also brings the window into focus and performs a paste in one go.

Expected Behavior

The new text from step 4 is pasted.
The old selected text should not be copied by right clicking.

Actual Behavior

The already selected text gets copied to the clipboard again before the paste happens. So the text from step 3 is pasted.

Same thing can happen when switching between Terminal tabs without clearing the selection first.
So it seems that right click copies an already selected text first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-UserInterfaceIssues pertaining to the user interface of the Console or TerminalIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsPriority-3A description (P3)Product-TerminalThe new Windows Terminal.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions