Skip to content

Commit 74223c1

Browse files
authored
vim: Fix shortcuts that require shift+punct (#20990)
Fixes a bug I introduced in #20953 Release Notes: - N/A
1 parent 0b373d4 commit 74223c1

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

crates/gpui/src/platform/mac/events.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,18 @@ unsafe fn parse_keystroke(native_event: id) -> Keystroke {
341341
chars_ignoring_modifiers = chars_with_cmd;
342342
}
343343

344+
if !control && !command && !function {
345+
let mut mods = NO_MOD;
346+
if shift {
347+
mods |= SHIFT_MOD;
348+
}
349+
if alt {
350+
mods |= OPTION_MOD;
351+
}
352+
353+
key_char = Some(chars_for_modified_key(native_event.keyCode(), mods));
354+
}
355+
344356
let mut key = if shift
345357
&& chars_ignoring_modifiers
346358
.chars()
@@ -354,18 +366,6 @@ unsafe fn parse_keystroke(native_event: id) -> Keystroke {
354366
chars_ignoring_modifiers
355367
};
356368

357-
if !control && !command && !function {
358-
let mut mods = NO_MOD;
359-
if shift {
360-
mods |= SHIFT_MOD;
361-
}
362-
if alt {
363-
mods |= OPTION_MOD;
364-
}
365-
366-
key_char = Some(chars_for_modified_key(native_event.keyCode(), mods));
367-
}
368-
369369
key
370370
}
371371
};

0 commit comments

Comments
 (0)