Fix panic caused by focusing the same thing twice

This commit is contained in:
Conrad Irwin 2023-11-09 22:23:36 -07:00
parent 5a711886d4
commit cc9fb9dea0
3 changed files with 7 additions and 3 deletions

View file

@ -268,7 +268,6 @@ impl PickerDelegate for CommandPaletteDelegate {
}
fn dismissed(&mut self, cx: &mut ViewContext<Picker<Self>>) {
cx.focus(&self.previous_focus_handle);
self.command_palette
.update(cx, |_, cx| cx.emit(ModalEvent::Dismissed))
.log_err();