From 634b6d455f064116c609e7cfa1b2b45e51f40029 Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Tue, 9 Aug 2022 07:01:26 +0530 Subject: Add custom event type replacing crossterm's Event (#3169) Ported over from 61365dfbf3 in the `gui` branch. This will allow adding our own events, most notably an idle timer event (useful for adding debounced input in [dynamic pickers][1] used by interactive global search and workspace symbols). [1]: https://github.com/helix-editor/helix/pull/3110 Co-authored-by: Blaž Hrastnik --- helix-term/src/commands.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-term/src/commands.rs') diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 32f28004..17d908a8 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -4846,7 +4846,7 @@ fn replay_macro(cx: &mut Context) { cx.callback = Some(Box::new(move |compositor, cx| { for _ in 0..count { for &key in keys.iter() { - compositor.handle_event(crossterm::event::Event::Key(key.into()), cx); + compositor.handle_event(compositor::Event::Key(key), cx); } } // The macro under replay is cleared at the end of the callback, not in the -- cgit v1.2.3-70-g09d2