From 70e791a78eb62edca06d6b61d95cddfaddb924ca Mon Sep 17 00:00:00 2001 From: dcorral Date: Thu, 6 Nov 2025 21:32:27 +0100 Subject: [PATCH] Fix width height --- src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index c0b13ae..9ba0a3d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,12 @@ use std::io::stdout; fn main() -> Result<(), Box> { enable_raw_mode()?; - let (width, height) = crossterm::terminal::size()?; + let (mut width, mut height) = crossterm::terminal::size()?; + if width == 0 || height == 0 { + // Fallback for SSH or terminals that don't report size + width = 80; + height = 24; + } println!("Width: {}, Height: {}", width, height); // if width < 15 || height < 15 { // disable_raw_mode()?;