Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some typos #213

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading