And restore the command palette spawn behaviour

This commit is contained in:
Conrad Irwin 2023-12-12 19:27:09 -07:00
parent 1a86e4ff96
commit 630997db28
2 changed files with 129 additions and 131 deletions

View file

@ -291,7 +291,9 @@ impl PickerDelegate for CommandPaletteDelegate {
});
let action = command.action;
cx.focus(&self.previous_focus_handle);
cx.dispatch_action(action);
cx.window_context()
.spawn(move |mut cx| async move { cx.update(|_, cx| cx.dispatch_action(action)) })
.detach_and_log_err(cx);
self.dismissed(cx);
}