aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/ui/picker.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs
index aad3f81c..eb935e56 100644
--- a/helix-term/src/ui/picker.rs
+++ b/helix-term/src/ui/picker.rs
@@ -1,4 +1,5 @@
use crate::{
+ alt,
compositor::{Component, Compositor, Context, Event, EventResult},
ctrl, key, shift,
ui::{self, fuzzy_match::FuzzyQuery, EditorView},
@@ -619,6 +620,11 @@ impl<T: Item + 'static> Component for Picker<T> {
key!(Esc) | ctrl!('c') => {
return close_fn;
}
+ alt!(Enter) => {
+ if let Some(option) = self.selection() {
+ (self.callback_fn)(cx, option, Action::Load);
+ }
+ }
key!(Enter) => {
if let Some(option) = self.selection() {
(self.callback_fn)(cx, option, Action::Replace);