Clarify that SetSize resizes the terminal buffer.

This commit is contained in:
Timon 2022-06-30 20:30:36 +02:00
parent 21155716e2
commit 645685641a
2 changed files with 7 additions and 3 deletions

View File

@ -1,7 +1,11 @@
use crossterm::tty::IsTty;
use std::io::stdin;
use crossterm::{tty::IsTty, terminal::{size, SetSize}, execute};
use std::io::{stdin, stdout};
pub fn main() {
println!("{:?}", size().unwrap());
execute!(stdout(), SetSize(10, 10)).unwrap();
println!("{:?}", size().unwrap());
if stdin().is_tty() {
println!("Is TTY");
} else {

View File

@ -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
///