diff options
author | Itay123 | 2023-01-16 07:18:13 +0000 |
---|---|---|
committer | GitHub | 2023-01-16 07:18:13 +0000 |
commit | d3e0f18c89c94c887d50d2487a4ee76eb96dda2b (patch) | |
tree | d54de9f6b3fb950d1c6452e4be0f714be6a22a4e /helix-term/src/ui | |
parent | cce19713fb970df1a96be7e76e3217e4e50efc42 (diff) |
Added opening files in the background with A-ret shortcut (#4435)
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/picker.rs | 6 |
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); |