Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/compositor.rs')
-rw-r--r--helix-term/src/compositor.rs14
1 files changed, 3 insertions, 11 deletions
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs
index 266a8aec..3dcb5f2b 100644
--- a/helix-term/src/compositor.rs
+++ b/helix-term/src/compositor.rs
@@ -27,7 +27,7 @@ pub struct Context<'a> {
pub jobs: &'a mut Jobs,
}
-impl Context<'_> {
+impl<'a> Context<'a> {
/// Waits on all pending jobs, and then tries to flush all pending write
/// operations for all documents.
pub fn block_try_flush_writes(&mut self) -> anyhow::Result<()> {
@@ -136,18 +136,10 @@ impl Compositor {
Some(self.layers.remove(idx))
}
- pub fn remove_type<T: 'static>(&mut self) {
- let type_name = std::any::type_name::<T>();
- self.layers
- .retain(|component| component.type_name() != type_name);
- }
pub fn handle_event(&mut self, event: &Event, cx: &mut Context) -> bool {
- // If it is a key event, a macro is being recorded, and a macro isn't being replayed,
- // push the key event to the recording.
+ // If it is a key event and a macro is being recorded, push the key event to the recording.
if let (Event::Key(key), Some((_, keys))) = (event, &mut cx.editor.macro_recording) {
- if cx.editor.macro_replaying.is_empty() {
- keys.push(*key);
- }
+ keys.push(*key);
}
let mut callbacks = Vec::new();