-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[ui] Difficult to get rid of selection area #4477
Comments
right clicking removes the selection because it is copied to the clipboard.
since windows 10 v1809 windows include a clipboard history ui which can be opened with the key combination: win+v |
i think #4404 close this |
I hope so. 😄 |
#4404 is about extending selection area and discarding selection area on ESC (discarding selection area on ESC already happens though) and some Shift-Click combo. My issue is about the fact that a single mouse click causes selection always (which is not how it works in text editors or other terminals except cmd?). I propose that mouse click causes selection only when mosue is dragged/snapped after a click and not starting selection on a single mouse click. |
I agree that this is one of the most annoying things about windows terminal. maybe a new settings-option could be implemented to deactivate this behavior. |
Yeah, I have never loved the fact that you can select a single cell in the console. Some people love it, though, and every time we try to take it from them they riot. I wish I were kidding To that end, we coupled a "fix" for it in with people who opt for a more xterm-like experience by enabling Is that an acceptable solution? We're trying to bridge the gap between what Windows users expect and what non-windows users might want. |
The PS: A welcome side effect of this option if possible could also be the enabling of selection in an unfocused terminal window.
This behavior is great in the current state where you select things by accident but with |
Also, like in ReSharper / VS, maybe some presets in Configuration would be good: "xterm" / "Gnome Terminal" / "cmd" could be introduced, so that it's super easy to set all options at once. And maybe it could be asked at first run. But of course, for the narrative "Windows is better Linux distro than Mac OS X", Linux/Mac typical terminal behaviors by defautl are nicer than cmd ones. |
I honestly have never seen the value in being able to have a single-character selection. If we could build enough momentum around getting rid of that (why would you want to copy just a single character? even if so, click-drag-return to first cell would do it) would that be acceptable? |
In wsltty one can select a single character even without “going back”, but it still requires some “snapping/dragging”, so that a single character selection (and any selection never happens at random). Same is true for other text editors like notepad or google docs |
Since this issue will be resolved only in a few months at the ealiest, for the time being, i use a workaround now. It's a whole different kind of pain but maybe it helps someone: Since the latest update brought mouse support to the terminal, i changed my zsh config to allow mouse inputs, which in effect renders the whole windows terminal mouse handling void.
The issue here is that once a selection is started with As i said it's not great at all, but the frequency that i'm annoyed about those new issues during a day is less often. |
Also one point from the OP we didn't discuss further: copying should not preferably make the selection area disappear, since after the copy one often wants to double-check what was copied or copy it again if the clipboard was rewritten for some reason (and with terminal we often copy between windows/applications, so this situation is quite often compared to a single vim session) |
This commit rewrites selection handling at the TermControl layer. Previously, we were keeping track of a number of redundant variables that were easy to get out of sync. The new selection model is as follows: * A single left click will always begin a _pending_ selection operation * A single left click will always clear a selection (#4477) * A double left click will always begin a word selection * A triple left click will always begin a line selection * A selection will only truly start when the cursor moves a quarter of the smallest dimension of a cell (usually its width) in any direction _This eliminates the selection of a single cell on one click._ (#4282, #5082) * We now keep track of whether the selection has been "copied", or "updated" since it was last copied. If an endpoint moves, it is updated. For copy-on-select, it is only copied if it's updated. (#4740) Because of this, we can stop tracking the position of the focus-raising click, and whether it was part of click-drag operation. All clicks can _become_ part of a click-drag operation if the user drags. We can also eliminate the special handling of single cell selection at the TerminalCore layer: since TermControl determines when to begin a selection, TerminalCore no longer needs to know whether copy on select is enabled _or_ whether the user has started and then backtracked over a single cell. This is now implicit in TermControl. Fixes #4082; Fixes #4477
In PR today: removing the behavior where a lone single click without a drag selects a cell, making it so that a single click clears any active selection, and adding a distance threshold (0.25x one cell) to begin selecting |
I'm marking that PR as closing this bug, because it seems to fit the brief. Vadim, what do you think? |
Excellent news! @DHowett-MSFT please go ahead :) |
This commit rewrites selection handling at the TermControl layer. Previously, we were keeping track of a number of redundant variables that were easy to get out of sync. The new selection model is as follows: * A single left click will always begin a _pending_ selection operation * A single left click will always clear a selection (#4477) * A double left click will always begin a word selection * A triple left click will always begin a line selection * A selection will only truly start when the cursor moves a quarter of the smallest dimension of a cell (usually its width) in any direction _This eliminates the selection of a single cell on one click._ (#4282, #5082) * We now keep track of whether the selection has been "copied", or "updated" since it was last copied. If an endpoint moves, it is updated. For copy-on-select, it is only copied if it's updated. (#4740) Because of this, we can stop tracking the position of the focus-raising click, and whether it was part of click-drag operation. All clicks can _become_ part of a click-drag operation if the user drags. We can also eliminate the special handling of single cell selection at the TerminalCore layer: since TermControl determines when to begin a selection, TerminalCore no longer needs to know whether copy on select is enabled _or_ whether the user has started and then backtracked over a single cell. This is now implicit in TermControl. Fixes #5082; Fixes #4477
🎉This issue was addressed in #5096, which has now been successfully released as Handy links: |
In Ubuntu Terminal selection caret is not the default mode. In Windows Terminal it is hard to get rid of selection mode. Even mouse clicking away on empty area preserves it (right mouse click or Esc does the trick, but we don't need these tricks in other applications or terminals). In many terminals a single clicking is not enough to turn on selection and snapping is needed.
Strangely, hitting Ctrl+Shift+C removes selection area after copying to clipboard. This is quite annoying, since often we want to preserve the selected area (for copying again later or checking what exactly was being copied)
(Also having a typing caret and selection area active at the same time is strange, e.g. in Chrome in text fields it is not like that, though this is less critical)
Original umbrella issue: #2209
The text was updated successfully, but these errors were encountered: