Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix panic when deploying emoji picker (character palette)
Antonio Scandurra9a6688bdfb87
diff --git a/crates/gpui2/src/platform/mac/window.rs b/crates/gpui2/src/platform/mac/window.rsindex 12189e198a7..a1fda0b75de 100644--- a/crates/gpui2/src/platform/mac/window.rs+++ b/crates/gpui2/src/platform/mac/window.rs@@ -886,11 +886,16 @@ impl PlatformWindow for MacWindow {}fn show_character_palette(&self) {- unsafe {- let app = NSApplication::sharedApplication(nil);- let window = self.0.lock().native_window;- let _: () = msg_send![app, orderFrontCharacterPalette: window];- }+ let this = self.0.lock();+ let window = this.native_window;+ this.executor+ .spawn(async move {+ unsafe {+ let app = NSApplication::sharedApplication(nil);+ let _: () = msg_send![app, orderFrontCharacterPalette: window];+ }+ })+ .detach();}fn minimize(&self) {