@@ -1,4 +1,5 @@
1use crate::{
1use crate::{
2 compositor::{Component, Compositor, Context, Event, EventResult},
3 compositor::{Component, Compositor, Context, Event, EventResult},
3 ctrl, key, shift,
4 ctrl, key, shift,
4 ui::{self, fuzzy_match::FuzzyQuery, EditorView},
5 ui::{self, fuzzy_match::FuzzyQuery, EditorView},
@@ -619,6 +620,11 @@ impl<T: Item + 'static> Component for Picker<T> {
619 key!(Esc) | ctrl!('c') => {
620 key!(Esc) | ctrl!('c') => {
620 return close_fn;
621 return close_fn;
624+ if let Some(option) = self.selection() {
625+ (self.callback_fn)(cx, option, Action::Load);
622 key!(Enter) => {
628 key!(Enter) => {
623 if let Some(option) = self.selection() {
629 if let Some(option) = self.selection() {
624 (self.callback_fn)(cx, option, Action::Replace);
630 (self.callback_fn)(cx, option, Action::Replace);