aboutsummaryrefslogtreecommitdiff
path: root/helix-tui
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-06-02 13:45:43 +0000
committerGitHub2021-06-02 13:45:43 +0000
commit2719a35123e2b4000a0b2b863c929dd2824fff9a (patch)
treef47d33355c14887e82b7d86c232c9bcc43caf0df /helix-tui
parent0a6672c6261062eb13ed8c30ab2800c340e5f6ac (diff)
parent78980f575be1cbb31f1bdab92d3ecd2be4d2adac (diff)
Merge pull request #55 from helix-editor/autoresize
autoresize terminal in compositor render
Diffstat (limited to 'helix-tui')
-rw-r--r--helix-tui/src/terminal.rs8
1 files changed, 3 insertions, 5 deletions
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(())
}