on master help sign in
picker: open file on Enter.
8b263efBlaž Hrastnik
helix-term/src/ui/picker.rs+10
@@ -159,6 +159,16 @@ impl Component for Picker {
159 } => {
159 } => {
160 return close_fn;
160 return close_fn;
161 }
161 }
162+ KeyEvent {
163+ code: KeyCode::Enter,
164+ ..
165+ } => {
166+ let size = cx.editor.view().unwrap().size;
167+ if let Some(path) = self.selection() {
168+ cx.editor.open(path.into(), size);
169+ }
170+ return close_fn;
171+ }
162 _ => {
172 _ => {
163 match self.prompt.handle_event(event, cx) {
173 match self.prompt.handle_event(event, cx) {
164 EventResult::Consumed(_) => {
174 EventResult::Consumed(_) => {