mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-13 05:42:59 +00:00
vim: Fix shortcuts that require shift+punct (#20990)
Fixes a bug I introduced in #20953 Release Notes: - N/A
This commit is contained in:
parent
0b373d43dc
commit
74223c1b00
1 changed files with 12 additions and 12 deletions
|
@ -341,6 +341,18 @@ unsafe fn parse_keystroke(native_event: id) -> Keystroke {
|
|||
chars_ignoring_modifiers = chars_with_cmd;
|
||||
}
|
||||
|
||||
if !control && !command && !function {
|
||||
let mut mods = NO_MOD;
|
||||
if shift {
|
||||
mods |= SHIFT_MOD;
|
||||
}
|
||||
if alt {
|
||||
mods |= OPTION_MOD;
|
||||
}
|
||||
|
||||
key_char = Some(chars_for_modified_key(native_event.keyCode(), mods));
|
||||
}
|
||||
|
||||
let mut key = if shift
|
||||
&& chars_ignoring_modifiers
|
||||
.chars()
|
||||
|
@ -354,18 +366,6 @@ unsafe fn parse_keystroke(native_event: id) -> Keystroke {
|
|||
chars_ignoring_modifiers
|
||||
};
|
||||
|
||||
if !control && !command && !function {
|
||||
let mut mods = NO_MOD;
|
||||
if shift {
|
||||
mods |= SHIFT_MOD;
|
||||
}
|
||||
if alt {
|
||||
mods |= OPTION_MOD;
|
||||
}
|
||||
|
||||
key_char = Some(chars_for_modified_key(native_event.keyCode(), mods));
|
||||
}
|
||||
|
||||
key
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue