Clarify that SetSize resizes the terminal buffer.
This commit is contained in:
parent
21155716e2
commit
645685641a
@ -1,7 +1,11 @@
|
|||||||
use crossterm::tty::IsTty;
|
use crossterm::{tty::IsTty, terminal::{size, SetSize}, execute};
|
||||||
use std::io::stdin;
|
use std::io::{stdin, stdout};
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
|
println!("{:?}", size().unwrap());
|
||||||
|
execute!(stdout(), SetSize(10, 10)).unwrap();
|
||||||
|
println!("{:?}", size().unwrap());
|
||||||
|
|
||||||
if stdin().is_tty() {
|
if stdin().is_tty() {
|
||||||
println!("Is TTY");
|
println!("Is TTY");
|
||||||
} else {
|
} else {
|
||||||
|
@ -338,7 +338,7 @@ impl Command for Clear {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A command that sets the terminal size `(columns, rows)`.
|
/// A command that sets the terminal buffer size `(columns, rows)`.
|
||||||
///
|
///
|
||||||
/// # Notes
|
/// # Notes
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user