Added opening files in the background with A-ret shortcut (#4435)

pull/5/head
Itay123 2 years ago committed by GitHub
parent cce19713fb
commit d3e0f18c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save