From f4e5c2611277fe3e1f64b3ca9dc55ca6ca3edc29 Mon Sep 17 00:00:00 2001 From: Nikita Revenco <154856872+NikitaRevenco@users.noreply.github.com> Date: Mon, 17 Feb 2025 21:09:04 +0000 Subject: [PATCH] feat: figure out how to pass custom callback function set by keymap to picker --- helix-term/src/ui/mod.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index bbd71ca5c..dc2b020f5 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -14,11 +14,12 @@ mod statusline; mod text; mod text_decorations; -use crate::compositor::Compositor; -use crate::filter_picker_entry; +use crate::compositor::{Compositor, Context}; use crate::job::{self, Callback}; +use crate::{ctrl, filter_picker_entry}; pub use completion::Completion; pub use editor::EditorView; +use helix_core::hashmap; use helix_stdx::rope; use helix_view::theme::Style; pub use markdown::Markdown; @@ -32,6 +33,7 @@ pub use text::Text; use helix_view::Editor; use tui::text::Span; +use std::collections::HashMap; use std::path::Path; use std::{error::Error, path::PathBuf}; @@ -296,6 +298,11 @@ pub fn file_explorer(root: PathBuf, editor: &Editor) -> Result = Box::new(|cx: &mut Context| { + log::error!("1"); + }); + let picker = Picker::new( columns, 0, @@ -324,7 +331,8 @@ pub fn file_explorer(root: PathBuf, editor: &Editor) -> Result delete_file)); Ok(picker) }