1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 15:04:36 +03:00

allow left-button-release to copy to selection when shift is held

This is really a timing issue: if shift-click extension of the mouse
selection is used, the user may release the mouse button slightly
after the SHIFT key (which is fine) or vice versa (which was not
previously matched)

refs: #1204
This commit is contained in:
Wez Furlong 2021-12-23 12:33:51 -07:00
parent cde8fe0e85
commit 0e6c75c026
3 changed files with 12 additions and 0 deletions

View File

@ -510,6 +510,16 @@ impl InputMap {
},
ExtendSelectionToMouseCursor(None)
],
[
Modifiers::SHIFT,
MouseEventTrigger::Up {
streak: 1,
button: MouseButton::Left
},
CompleteSelectionOrOpenLinkAtMouseCursor(
ClipboardCopyDestination::PrimarySelection
)
],
[
Modifiers::NONE,
MouseEventTrigger::Up {

View File

@ -26,6 +26,7 @@ As features stabilize some brief notes about them will accumulate here.
#### Changed
* quickselect: we now de-duplicate labels for results with the same textual content. [#1271](https://github.com/wez/wezterm/issues/1271)
* The default `CompleteSelectionOrOpenLinkAtMouseCursor` left button release assignment now also accepts SHIFT being held in order to make SHIFT-click `ExtendSelectionToMouseCursor` feel more ergonomic if the mouse button is released before the SHIFT key. [#1204](https://github.com/wez/wezterm/issues/1204)
#### Updated and Improved

View File

@ -32,6 +32,7 @@ that order.
| Double Left Down | `NONE` | `SelectTextAtMouseCursor="Word"` |
| Single Left Down | `NONE` | `SelectTextAtMouseCursor="Cell"` |
| Single Left Down | `SHIFT` | `ExtendSelectionToMouseCursor={}` |
| Single Left Up | `SHIFT` | `CompleteSelectionOrOpenLinkAtMouseCursor="PrimarySelection"` |
| Single Left Up | `NONE` | `CompleteSelectionOrOpenLinkAtMouseCursor="PrimarySelection"` |
| Double Left Up | `NONE` | `CompleteSelection="PrimarySelection"` |
| Triple Left Up | `NONE` | `CompleteSelection="PrimarySelection"` |