Skip to content

Commit

Permalink
Fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Jun 15, 2024
1 parent de2f15a commit e8bf36e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ term.clear_line()?;

## Colors and Styles

`console` automaticaly detects when to use colors based on the tty flag. It also
`console` automatically detects when to use colors based on the tty flag. It also
provides higher level wrappers for styling text and other things that can be
displayed with the `style` function and utility types.

Expand Down
4 changes: 2 additions & 2 deletions examples/cursor_at.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use console::{style, Term};

fn write_chars() -> io::Result<()> {
let term = Term::stdout();
let (heigth, width) = term.size();
let (height, width) = term.size();
for x in 0..width {
for y in 0..heigth {
for y in 0..height {
term.move_cursor_to(x as usize, y as usize)?;
let text = if (x + y) % 2 == 0 {
format!("{}", style(x % 10).black().on_red())
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
//!
//! # Colors and Styles
//!
//! `console` automaticaly detects when to use colors based on the tty flag. It also
//! `console` automatically detects when to use colors based on the tty flag. It also
//! provides higher level wrappers for styling text and other things that can be
//! displayed with the `style` function and utility types.
//!
Expand All @@ -56,7 +56,7 @@
//!
//! # Working with ANSI Codes
//!
//! The crate provids the function `strip_ansi_codes` to remove ANSI codes
//! The crate provides the function `strip_ansi_codes` to remove ANSI codes
//! from a string as well as `measure_text_width` to calculate the width of a
//! string as it would be displayed by the terminal. Both of those together
//! are useful for more complex formatting.
Expand Down
2 changes: 1 addition & 1 deletion src/unix_term.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ pub fn read_single_key(ctrlc_key: bool) -> io::Result<Key> {
let rv: io::Result<Key> = read_single_key_impl(fd);
c_result(|| unsafe { libc::tcsetattr(fd, libc::TCSADRAIN, &original) })?;

// if the user hit ^C we want to signal SIGINT to outselves.
// if the user hit ^C we want to signal SIGINT to ourselves.
if let Err(ref err) = rv {
if err.kind() == io::ErrorKind::Interrupted {
if !ctrlc_key {
Expand Down
2 changes: 1 addition & 1 deletion src/windows_term/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ pub fn read_single_key(_ctrlc_key: bool) -> io::Result<Key> {
// Confirm that there is a next character to read.
if get_key_event_count()? == 0 {
let message = format!(
"Read invlid utf16 {}: {}",
"Read invalid utf16 {}: {}",
unicode_char,
InvalidUtf16Tuple::MissingSecond
);
Expand Down

0 comments on commit e8bf36e

Please sign in to comment.