From d3e0f18c89c94c887d50d2487a4ee76eb96dda2b Mon Sep 17 00:00:00 2001 From: Itay123 Date: Mon, 16 Jan 2023 09:18:13 +0200 Subject: Added opening files in the background with A-ret shortcut (#4435) --- helix-term/src/ui/picker.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'helix-term/src') 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 Component for Picker { 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); -- cgit v1.2.3-70-g09d2