From d3e0f18c89c94c887d50d2487a4ee76eb96dda2b Mon Sep 17 00:00:00 2001
From: Itay123 <40892795+Itay123TheKing@users.noreply.github.com>
Date: Mon, 16 Jan 2023 09:18:13 +0200
Subject: [PATCH] Added opening files in the background with A-ret shortcut
 (#4435)

---
 helix-term/src/ui/picker.rs | 6 ++++++
 1 file changed, 6 insertions(+)

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);