mirror of
https://github.com/denisidoro/navi
synced 2024-11-10 14:04:17 +00:00
Change terminal fallback width to 80
This commit is contained in:
parent
a754a6b041
commit
317cc34016
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
||||||
use terminal_size::{terminal_size, terminal_size_using_fd, Height, Width};
|
use terminal_size::{terminal_size, terminal_size_using_fd, Height, Width};
|
||||||
|
|
||||||
|
const FALLBACK_WIDTH: u16 = 80;
|
||||||
|
|
||||||
fn width_with_shell_out() -> u16 {
|
fn width_with_shell_out() -> u16 {
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
use std::process::Stdio;
|
use std::process::Stdio;
|
||||||
|
@ -30,7 +32,7 @@ fn width_with_shell_out() -> u16 {
|
||||||
u16::from_str_radix(data.next().expect("Not enough data"), 10)
|
u16::from_str_radix(data.next().expect("Not enough data"), 10)
|
||||||
.expect("Invalid base-10 number")
|
.expect("Invalid base-10 number")
|
||||||
}
|
}
|
||||||
_ => 40,
|
_ => FALLBACK_WIDTH,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue