diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2022-01-11 00:56:49 +0300 |
---|---|---|
committer | Christian Duerr <contact@christianduerr.com> | 2022-01-13 03:44:09 +0100 |
commit | fb1bf904b8b9aefaec712d3eb68d12468b6f2a35 (patch) | |
tree | 9d4a6559a8af4c5f68bd5d07fb1ed199b35e9562 | |
parent | 7a0160d35b9a5adbd1c32c891dc8ae50a4706a6b (diff) | |
download | alacritty-fb1bf904b8b9aefaec712d3eb68d12468b6f2a35.tar.gz alacritty-fb1bf904b8b9aefaec712d3eb68d12468b6f2a35.zip |
Fix block selection expansion with Ctrl + RMB
When 'ExpandSelection' binding was added only default binding for
RightClick was added, however to expand block selection holding control
when doing a click is required, so this commit adds a binding for
'RMB + Control'.
-rw-r--r-- | alacritty.yml | 5 | ||||
-rw-r--r-- | alacritty/src/config/bindings.rs | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/alacritty.yml b/alacritty.yml index 09abce3c..00c16ce3 100644 --- a/alacritty.yml +++ b/alacritty.yml @@ -528,8 +528,9 @@ # # - `mods` (see key bindings) #mouse_bindings: -# - { mouse: Right, action: ExpandSelection } -# - { mouse: Middle, mode: ~Vi, action: PasteSelection } +# - { mouse: Right, action: ExpandSelection } +# - { mouse: Right, mods: Control, action: ExpandSelection } +# - { mouse: Middle, mode: ~Vi, action: PasteSelection } # Key bindings # diff --git a/alacritty/src/config/bindings.rs b/alacritty/src/config/bindings.rs index 533573c8..6de0d4b1 100644 --- a/alacritty/src/config/bindings.rs +++ b/alacritty/src/config/bindings.rs @@ -363,7 +363,8 @@ macro_rules! bindings { pub fn default_mouse_bindings() -> Vec<MouseBinding> { bindings!( MouseBinding; - MouseButton::Right; MouseAction::ExpandSelection; + MouseButton::Right; MouseAction::ExpandSelection; + MouseButton::Right, ModifiersState::CTRL; MouseAction::ExpandSelection; MouseButton::Middle, ~BindingMode::VI; Action::PasteSelection; ) } |