mirror of https://github.com/helix-editor/helix
Added opening files in the background with A-ret shortcut (#4435)
parent
cce19713fb
commit
d3e0f18c89
|
@ -1,4 +1,5 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
|
alt,
|
||||||
compositor::{Component, Compositor, Context, Event, EventResult},
|
compositor::{Component, Compositor, Context, Event, EventResult},
|
||||||
ctrl, key, shift,
|
ctrl, key, shift,
|
||||||
ui::{self, fuzzy_match::FuzzyQuery, EditorView},
|
ui::{self, fuzzy_match::FuzzyQuery, EditorView},
|
||||||
|
@ -619,6 +620,11 @@ impl<T: Item + 'static> Component for Picker<T> {
|
||||||
key!(Esc) | ctrl!('c') => {
|
key!(Esc) | ctrl!('c') => {
|
||||||
return close_fn;
|
return close_fn;
|
||||||
}
|
}
|
||||||
|
alt!(Enter) => {
|
||||||
|
if let Some(option) = self.selection() {
|
||||||
|
(self.callback_fn)(cx, option, Action::Load);
|
||||||
|
}
|
||||||
|
}
|
||||||
key!(Enter) => {
|
key!(Enter) => {
|
||||||
if let Some(option) = self.selection() {
|
if let Some(option) = self.selection() {
|
||||||
(self.callback_fn)(cx, option, Action::Replace);
|
(self.callback_fn)(cx, option, Action::Replace);
|
||||||
|
|
Loading…
Reference in New Issue