aboutsummaryrefslogtreecommitdiff
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.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs
index bd27f138..4869032b 100644
--- a/helix-term/src/compositor.rs
+++ b/helix-term/src/compositor.rs
@@ -92,7 +92,10 @@ impl Compositor {
.expect("Unable to resize terminal")
}
- pub fn push(&mut self, layer: Box<dyn Component>) {
+ pub fn push(&mut self, mut layer: Box<dyn Component>) {
+ let size = self.size();
+ // trigger required_size on init
+ layer.required_size((size.width, size.height));
self.layers.push(layer);
}