Don't call setAllowsAutomaticKeyEquivalentLocalization on Big Sur (cherry-pick #20844) (#20846)

gcp-cherry-pick-bot[bot] and Conrad Irwin created

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

Closes #20821

Release Notes:

- Fixed a crash on Big Sur (preview only)

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Change summary

crates/gpui/src/platform/mac/platform.rs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Detailed changes

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.