diff options
author | Blaž Hrastnik | 2020-12-21 07:23:05 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2020-12-21 07:26:22 +0000 |
commit | 3d3295bb759994d4fbf328c126678f63e0c38d4f (patch) | |
tree | ca93396f3fa0c42a8c6f0c2277f41b1d344fe791 /helix-term/src/compositor.rs | |
parent | ea502c8665332932b2311df3852b5ac8df6509af (diff) |
ui: buffer picker on ctrl-b
Diffstat (limited to 'helix-term/src/compositor.rs')
-rw-r--r-- | helix-term/src/compositor.rs | 4 |
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, |