mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-11-28 21:20:23 +03:00
picker: open file on Enter.
This commit is contained in:
parent
edfd3933db
commit
8b263ef04b
@ -159,6 +159,16 @@ impl Component for Picker {
|
||||
} => {
|
||||
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