Drop platform lock when setting menu (#20962)
Turns out setting the menu (sometimes) calls `selected_range` on the input handler. https://zed-industries.slack.com/archives/C04S6T1T7TQ/p1732160078058279 Release Notes: - Fixed a panic when reloading keymaps
This commit is contained in:
parent
e062f30d9e
commit
7285cdb955
1 changed files with 3 additions and 1 deletions
|
@ -844,7 +844,9 @@ impl Platform for MacPlatform {
|
|||
let app: id = msg_send![APP_CLASS, sharedApplication];
|
||||
let mut state = self.0.lock();
|
||||
let actions = &mut state.menu_actions;
|
||||
app.setMainMenu_(self.create_menu_bar(menus, NSWindow::delegate(app), actions, keymap));
|
||||
let menu = self.create_menu_bar(menus, NSWindow::delegate(app), actions, keymap);
|
||||
drop(state);
|
||||
app.setMainMenu_(menu);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue