From c0332bd935bb7c016278d43a526e588558a0cab1 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Thu, 3 Jun 2021 10:28:49 +0900 Subject: Fix split sizes getting out of sync with the terminal size, refs #69 --- helix-tui/src/terminal.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'helix-tui') 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 { 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 -- cgit v1.2.3-70-g09d2