Skip to content

Commit

Permalink
Added opening files in the background with A-ret shortcut (#4435)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyyyylime authored Jan 16, 2023
1 parent cce1971 commit d3e0f18
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions helix-term/src/ui/picker.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::{
alt,
compositor::{Component, Compositor, Context, Event, EventResult},
ctrl, key, shift,
ui::{self, fuzzy_match::FuzzyQuery, EditorView},
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d3e0f18

Please sign in to comment.