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.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs
index 59e93e03..3c90b76a 100644
--- a/helix-term/src/compositor.rs
+++ b/helix-term/src/compositor.rs
@@ -44,7 +44,9 @@ pub struct Context<'a> {
pub trait Component {
/// Process input events, return true if handled.
- fn handle_event(&mut self, event: Event, ctx: &mut Context) -> EventResult;
+ fn handle_event(&mut self, event: Event, ctx: &mut Context) -> EventResult {
+ EventResult::Ignored
+ }
// , args: ()
/// Should redraw? Useful for saving redraw cycles if we know component didn't change.
@@ -57,6 +59,10 @@ pub trait Component {
fn cursor_position(&self, area: Rect, ctx: &Editor) -> Option<Position> {
None
}
+
+ fn size_hint(&self, area: Rect) -> Option<(usize, usize)> {
+ None
+ }
}
// For v1: