aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/compositor.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-06-03 01:28:49 +0000
committerBlaž Hrastnik2021-06-03 01:28:49 +0000
commitc0332bd935bb7c016278d43a526e588558a0cab1 (patch)
treed7a65b8aef3bde84baa7a39196a089e203f95d2a /helix-term/src/compositor.rs
parent3c7729906c9a677d715f2694c16cd78200691aaf (diff)
Fix split sizes getting out of sync with the terminal size, refs #69
Diffstat (limited to 'helix-term/src/compositor.rs')
-rw-r--r--helix-term/src/compositor.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs
index 7753e0a5..967ea034 100644
--- a/helix-term/src/compositor.rs
+++ b/helix-term/src/compositor.rs
@@ -122,11 +122,17 @@ impl Compositor {
}
pub fn render(&mut self, cx: &mut Context) {
- self.terminal.autoresize().unwrap();
- let area = self.size();
+ let area = self
+ .terminal
+ .autoresize()
+ .expect("Unable to determine terminal size");
+
+ // TODO: need to recalculate view tree if necessary
let surface = self.terminal.current_buffer_mut();
+ let area = surface.area().clone();
+
for layer in &self.layers {
layer.render(area, surface, cx)
}