-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Comments
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:
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, |
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). |
I'm just gonna go ahead and dedupe these: /dup #5099 |
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! |
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
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.
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.
The text was updated successfully, but these errors were encountered: