summaryrefslogtreecommitdiff
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.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 157d19f7..e6cbed2c 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -73,13 +73,15 @@ use grep_searcher::{sinks, BinaryDetection, SearcherBuilder};
use ignore::{DirEntry, WalkBuilder, WalkState};
use tokio_stream::wrappers::UnboundedReceiverStream;
+pub type OnKeyCallback = Box<dyn FnOnce(&mut Context, KeyEvent)>;
+
pub struct Context<'a> {
pub register: Option<char>,
pub count: Option<NonZeroUsize>,
pub editor: &'a mut Editor,
pub callback: Option<crate::compositor::Callback>,
- pub on_next_key_callback: Option<Box<dyn FnOnce(&mut Context, KeyEvent)>>,
+ pub on_next_key_callback: Option<OnKeyCallback>,
pub jobs: &'a mut Jobs,
}