on master help sign in
Added opening files in the background with A-ret shortcut (#4435)
commitd3e0f18c89c94c887d50d2487a4ee76eb96dda2b authorItay123 <40892795+Itay123TheKing@users.noreply.github.com> dateMon 16 Jan 2023, 09:18 (4 years ago) parentcce1971
1 file changed+6
helix-term/src/ui/picker.rs+6
helix-term/src/ui/picker.rs+6
@@ -1,4 +1,5 @@
11use crate::{
2+ alt,
23 compositor::{Component, Compositor, Context, Event, EventResult},
34 ctrl, key, shift,
45 ui::{self, fuzzy_match::FuzzyQuery, EditorView},
@@ -619,6 +620,11 @@ impl<T: Item + 'static> Component for Picker<T> {
619620 key!(Esc) | ctrl!('c') => {
620621 return close_fn;
621622 }
623+ alt!(Enter) => {
624+ if let Some(option) = self.selection() {
625+ (self.callback_fn)(cx, option, Action::Load);
626+ }
627+ }
622628 key!(Enter) => {
623629 if let Some(option) = self.selection() {
624630 (self.callback_fn)(cx, option, Action::Replace);