diff options
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r-- | helix-term/src/application.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index c7d98fce..4bb36b59 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -435,18 +435,13 @@ impl Application { } pub fn handle_idle_timeout(&mut self) { - use crate::compositor::EventResult; - let editor_view = self - .compositor - .find::<ui::EditorView>() - .expect("expected at least one EditorView"); - let mut cx = crate::compositor::Context { editor: &mut self.editor, jobs: &mut self.jobs, scroll: None, }; - if let EventResult::Consumed(_) = editor_view.handle_idle_timeout(&mut cx) { + let should_render = self.compositor.handle_event(&Event::IdleTimeout, &mut cx); + if should_render { self.render(); } } |