Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Don't call setAllowsAutomaticKeyEquivalentLocalization on Big Sur (#20844)

Conrad Irwine7a0890086fb
diff --git a/crates/gpui/src/platform/mac/platform.rs b/crates/gpui/src/platform/mac/platform.rs
index b744c658cee..faf93297345 100644
--- a/crates/gpui/src/platform/mac/platform.rs
+++ b/crates/gpui/src/platform/mac/platform.rs
@@ -343,8 +343,10 @@ impl MacPlatform {
ns_string(key_to_native(&keystroke.key).as_ref()),
)
.autorelease();
- let _: () =
- msg_send![item, setAllowsAutomaticKeyEquivalentLocalization: NO];
+ if MacPlatform::os_version().unwrap() >= SemanticVersion::new(12, 0, 0) {
+ let _: () =
+ msg_send![item, setAllowsAutomaticKeyEquivalentLocalization: NO];
+ }
item.setKeyEquivalentModifierMask_(mask);
}
// For multi-keystroke bindings, render the keystroke as part of the title.