Skip to content
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

Duplicate copyOnSelect actions #4255

Closed
maguiresf opened this issue Jan 16, 2020 · 0 comments · Fixed by #4596
Closed

Duplicate copyOnSelect actions #4255

maguiresf opened this issue Jan 16, 2020 · 0 comments · Fixed by #4596
Assignees
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-DataLoss A bug that causes the user's data to be lost, unintentionally
Milestone

Comments

@maguiresf
Copy link

Environment

Platform ServicePack Version VersionString


Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0

Windows Terminal Version 0.8.10091.0

Steps to reproduce

Open WSL Ubuntu terminal
Select a block on text with copyOnSelect enabled (for example "TEST1")
Ensure block of text remains highlighted
Switch to notepad instance
Paste selected text into Notepad
Make some change to text, (for example change string to "TEST999")
Copy string inside Notepad
Highlight Windows Terminal
Paste string into Windows Terminal

Expected behavior

TEST999 is pasted into Windows Terminal window

Actual behavior

TEST1 is pasted into Windows Terminal window

Notes

It appears that each time the window is made active, a new copyOnSelect action is performed if there is some text previously highlighted. I would expect the Terminal to only perform the copy operation the very first time the text is highlighted.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jan 16, 2020
@DHowett-MSFT DHowett-MSFT added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. labels Jan 16, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jan 16, 2020
@DHowett-MSFT DHowett-MSFT added Needs-Tag-Fix Doesn't match tag requirements and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jan 16, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jan 16, 2020
@DHowett-MSFT DHowett-MSFT added the Priority-2 A description (P2) label Jan 16, 2020
@DHowett-MSFT DHowett-MSFT added this to the Terminal v1.0 milestone Jan 16, 2020
@cinnamon-msft cinnamon-msft added Priority-0 Bugs that we consider release-blocking/recall-class (P0) Severity-DataLoss A bug that causes the user's data to be lost, unintentionally v1-Scrubbed and removed Priority-2 A description (P2) labels Jan 23, 2020
@leonMSFT leonMSFT self-assigned this Feb 10, 2020
@ghost ghost added the In-PR This issue has a related PR label Feb 14, 2020
@ghost ghost closed this as completed in #4596 Feb 20, 2020
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Feb 20, 2020
ghost pushed a commit that referenced this issue Feb 20, 2020
)

## Summary of the Pull Request
Currently, clicking on an unfocused terminal with a selection active will trigger `copyOnSelect`. This is because the check for `copyOnSelect` and copying to the clipboard is bound to when the Pointer is released. This works fine for when a user performs a click-drag selection, but it inadvertently also triggers when the user performs a single click on an unfocused terminal. We expect `copyOnSelect` to trigger only on the first time a selection is completed. 

This PR will allow the user to single click on an unfocused terminal that has a selection active without triggering a copyOnSelect. It also ensures that any click-drag selection, whether it's on an unfocused or focused terminal, will trigger copyOnSelect.

## PR Checklist
* [x] Closes #4255

## Validation Steps Performed
Performed manual testing involving permutations of multiple panes, tabs, in focus, and out of focus.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-DataLoss A bug that causes the user's data to be lost, unintentionally
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants