picker: open file on Enter.
This commit is contained in:
parent
edfd3933db
commit
8b263ef04b
@ -159,6 +159,16 @@ fn handle_event(&mut self, event: Event, cx: &mut Context) -> EventResult {
|
||||
} => {
|
||||
return close_fn;
|
||||
}
|
||||
KeyEvent {
|
||||
code: KeyCode::Enter,
|
||||
..
|
||||
} => {
|
||||
let size = cx.editor.view().unwrap().size;
|
||||
if let Some(path) = self.selection() {
|
||||
cx.editor.open(path.into(), size);
|
||||
}
|
||||
return close_fn;
|
||||
}
|
||||
_ => {
|
||||
match self.prompt.handle_event(event, cx) {
|
||||
EventResult::Consumed(_) => {
|
||||
|
Loading…
Reference in New Issue
Block a user