Debugging width height error
All checks were successful
Deploy to VPS / deploy (push) Successful in 1m12s

This commit is contained in:
2025-11-06 20:05:46 +01:00
parent 4416c339a2
commit a65ce09e8e

View File

@@ -13,11 +13,12 @@ use std::io::stdout;
fn main() -> Result<(), Box<dyn std::error::Error>> {
enable_raw_mode()?;
let (width, height) = crossterm::terminal::size()?;
if width < 15 || height < 15 {
disable_raw_mode()?;
println!("Your console is too small.");
return Ok(());
}
println!("Width: {}, Height: {}", width, height);
// if width < 15 || height < 15 {
// disable_raw_mode()?;
// println!("Your console is too small.");
// return Ok(());
// }
let mut stdout = stdout();
execute!(stdout, EnterAlternateScreen)?;
let backend = CrosstermBackend::new(stdout);