aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r--helix-term/src/commands.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index cdd2ad34..4b246721 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -10,7 +10,7 @@ use helix_core::{
use once_cell::sync::Lazy;
use crate::compositor::Compositor;
-use crate::ui::{Prompt, PromptEvent};
+use crate::ui::{self, Prompt, PromptEvent};
use helix_view::{
document::Mode,
@@ -456,6 +456,12 @@ pub fn command_mode(cx: &mut Context) {
compositor.push(Box::new(prompt));
}));
}
+pub fn file_picker(cx: &mut Context) {
+ cx.callback = Some(Box::new(|compositor: &mut Compositor| {
+ let picker = ui::Picker::new();
+ compositor.push(Box::new(picker));
+ }));
+}
// calculate line numbers for each selection range
fn selection_lines(state: &State) -> Vec<usize> {