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'.
This commit is contained in:
Kirill Chibisov 2022-01-11 00:56:49 +03:00 committed by Christian Duerr
parent 7a0160d35b
commit fb1bf904b8
2 changed files with 5 additions and 3 deletions

View File

@ -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
#

View File

@ -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;
)
}