summaryrefslogtreecommitdiff
path: root/helix-term/src/compositor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/compositor.rs')
-rw-r--r--helix-term/src/compositor.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs
index f0d94dbc..b1b92a71 100644
--- a/helix-term/src/compositor.rs
+++ b/helix-term/src/compositor.rs
@@ -19,7 +19,7 @@ use smol::Executor;
use tui::buffer::Buffer as Surface;
use tui::layout::Rect;
-pub type Callback = Box<dyn FnOnce(&mut Compositor)>;
+pub type Callback = Box<dyn FnOnce(&mut Compositor, &mut Editor)>;
// --> EventResult should have a callback that takes a context with methods like .popup(),
// .prompt() etc. That way we can abstract it from the renderer.
@@ -128,7 +128,7 @@ impl Compositor {
if let Some(layer) = self.layers.last_mut() {
return match layer.handle_event(event, cx) {
EventResult::Consumed(Some(callback)) => {
- callback(self);
+ callback(self, cx.editor);
true
}
EventResult::Consumed(None) => true,