From 78980f575be1cbb31f1bdab92d3ecd2be4d2adac Mon Sep 17 00:00:00 2001 From: Jan Hrastnik Date: Wed, 2 Jun 2021 15:40:08 +0200 Subject: autoresize terminal in compositor render --- helix-tui/src/terminal.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'helix-tui/src/terminal.rs') diff --git a/helix-tui/src/terminal.rs b/helix-tui/src/terminal.rs index 7346d66d..1a0cae3e 100644 --- a/helix-tui/src/terminal.rs +++ b/helix-tui/src/terminal.rs @@ -138,11 +138,9 @@ where /// Queries the backend for size and resizes if it doesn't match the previous size. pub fn autoresize(&mut self) -> io::Result<()> { - if self.viewport.resize_behavior == ResizeBehavior::Auto { - let size = self.size()?; - if size != self.viewport.area { - self.resize(size)?; - } + let size = self.size()?; + if size != self.viewport.area { + self.resize(size)?; }; Ok(()) } -- cgit v1.2.3-70-g09d2