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

Reduce sensitivity of automatic copy selection #11027

Closed
timadye opened this issue Aug 24, 2021 · 5 comments
Closed

Reduce sensitivity of automatic copy selection #11027

timadye opened this issue Aug 24, 2021 · 5 comments
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@timadye
Copy link

timadye commented Aug 24, 2021

Description of the new feature/enhancement

My proposal is to make automatic copy selection less sensitive to small mouse movements while the button is held down.

Issue

The automatic copy selection feature is quite fragile. It is far too easy to accidentally select a single character, overwriting the paste buffer and losing what you actually were planning to paste. The most common way this impacts me is when I copy from another window, and select the Windows Terminal window with a left-click in the text area. If my mouse moves even a fraction during the click, then I lose my paste buffer.

It is possible to guard against this, eg. by only selecting the window using the title bar, or by right-clicking to select and paste at the same time. But these need to be learned and make Windows Terminal feel delicate and hard to use.

Proposed technical implementation details

  1. This could be implemented in terms of how much of the character cell is traversed before starting the selection (or including the next character in an ongoing selection). Other programs only seem to add the character to the selection once the mouse has traversed the full width or height of the character cell. This implementation might have the added benefit of making the copy less prone to including an extra character at the end.

  2. Another option would be to provide a configuration option to specify the minimum mouse movement (in pixels) before starting automatic copy selection. The default should be larger than is currently implemented - unless there is some issue with compatibility of UI experience. Or maybe it doesn't need to be configurable, just use a better minimum movement.
    Since it is unlikely that anyone wants to select a single character (or even two?), I think a reasonable default might be 1 character width. Actually anything up to 1 character height (to select a full line, moving down) would probably work.

I'm using Windows Terminal Preview v1.10.1933.0 on Windows 20H2 with an external USB mouse.

@timadye timadye added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Aug 24, 2021
@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 Aug 24, 2021
@zadjii-msft
Copy link
Member

I think this is kinda like #5099? (#5082 + #5096) made this a lot better, but it's still not perfect. I believe the threshold right now is 25% of the min(width, height) of a glyph.

@timadye
Copy link
Author

timadye commented Aug 24, 2021

Hi @zadjii-msft,

Thanks for the pointers. I suspect that a fix to #5099 would fix my issue as well (looks like my proposal 1). But perhaps my proposal 2 is even easier to fix, as your comment (and #5096) implies:

the threshold right now is 25% of the min(width, height) of a glyph

I would argue that changing 25% to 100% would work as well for real selections, since that allows for moving from the centre of one glyph to the centre of the next. It could be even more, since one rarely needs to select a single character.

On the other hand any increase in the threshold would reduce the number of spurious selections, so a conservative change might be to increase the threshold to 75%.

Would this be a trivially-easy fix?

Thanks,
Tim.

@zadjii-msft
Copy link
Member

Sorry, this somehow got lost in the backlog. I'm trying to add some notes here, but I certainly don't have the runway to give this a lot of thought at the moment, so my apologies for being brief. Changing the threshold to 75% would probably be trivial to fix. Though, there may be some debate as to whether it's best to just do #5099 instead of slightly changing how selection works (to implement the 75% threshold), then slightly changing it again (to implement #5099).

@zadjii-msft
Copy link
Member

I'm just gonna go ahead and dedupe these: /dup #5099

@zadjii-msft zadjii-msft closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2022
@ghost
Copy link

ghost commented Sep 9, 2022

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Sep 9, 2022
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed 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 Sep 9, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

2 participants