aboutsummaryrefslogtreecommitdiff
path: root/helix-tui/src
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-tui/src
parent3c7729906c9a677d715f2694c16cd78200691aaf (diff)
Fix split sizes getting out of sync with the terminal size, refs #69
Diffstat (limited to 'helix-tui/src')
-rw-r--r--helix-tui/src/terminal.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-tui/src/terminal.rs b/helix-tui/src/terminal.rs
index 1a0cae3e..ad1e8da3 100644
--- a/helix-tui/src/terminal.rs
+++ b/helix-tui/src/terminal.rs
@@ -137,12 +137,12 @@ where
}
/// Queries the backend for size and resizes if it doesn't match the previous size.
- pub fn autoresize(&mut self) -> io::Result<()> {
+ pub fn autoresize(&mut self) -> io::Result<Rect> {
let size = self.size()?;
if size != self.viewport.area {
self.resize(size)?;
};
- Ok(())
+ Ok(size)
}
/// Synchronizes terminal size, calls the rendering closure, flushes the current internal state