Don't wait to dispatch commands (#7755)

I added this when porting vim mode to gpui2 to work around life-cycle
problems.
Since #7647, this is no longer needed for vim mode, and causes other
problems (c.f. #7748)

Release Notes:

- Improved command to drop fewer keystrokes
This commit is contained in:
Conrad Irwin 2024-02-13 21:45:46 -07:00 committed by GitHub
parent c357e37dde
commit 7956a9a547
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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