Fix width height
All checks were successful
Deploy to VPS / deploy (push) Successful in 59s

This commit is contained in:
2025-11-06 21:32:27 +01:00
parent a65ce09e8e
commit 70e791a78e

View File

@@ -12,7 +12,12 @@ use std::io::stdout;
fn main() -> Result<(), Box<dyn std::error::Error>> {
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()?;