diff --git a/Cargo.toml b/Cargo.toml index 5052e89..c6d1b84 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crossterm" -version = "0.10.0" +version = "0.10.1" authors = ["T. Post"] description = "An crossplatform terminal library for manipulating terminals." repository = "https://github.com/TimonPost/crossterm" @@ -35,7 +35,7 @@ members = [ crossterm_screen = { optional = true, path = "./crossterm_screen", version = "^0.2" } crossterm_cursor = { optional = true, path = "./crossterm_cursor", version = "^0.2" } crossterm_terminal = { optional = true, path = "./crossterm_terminal", version = "^0.2" } -crossterm_style = { optional = true, path = "./crossterm_style", version = "^0.3" } +crossterm_style = { optional = true, path = "./crossterm_style", version = "^0.4" } crossterm_input = { optional = true, path = "./crossterm_input", version = "^0.3" } crossterm_utils = { optional = false, path = "./crossterm_utils", version = "^0.2"} diff --git a/README.md b/README.md index 1e57fb3..98442a8 100644 --- a/README.md +++ b/README.md @@ -53,13 +53,13 @@ This crate consists of five modules that are provided behind [feature flags](htt ## Getting Started -This documentation is only for Crossterm version `0.9.^`. If you have an older version of Crossterm, then I suggest you check the [Upgrade Manual](https://github.com/TimonPost/crossterm/blob/master/docs/UPGRADE.md). Also, check out the [examples](https://github.com/TimonPost/crossterm/tree/master/examples) folders with detailed examples for all functionality of this crate. +This documentation is only for Crossterm version `^0.10`. If you have an older version of Crossterm, then I suggest you check the [Upgrade Manual](https://github.com/TimonPost/crossterm/blob/master/docs/UPGRADE.md). Also, check out the [examples](https://github.com/TimonPost/crossterm/tree/master/examples) folders with detailed examples for all functionality of this crate. Add the Crossterm package to your `Cargo.toml` file. ``` [dependencies] -crossterm = "0.9.6" +crossterm = "^0.10" ``` ### Useful Links diff --git a/crossterm_cursor/src/sys/mod.rs b/crossterm_cursor/src/sys/mod.rs index 30d9af3..f725cbc 100644 --- a/crossterm_cursor/src/sys/mod.rs +++ b/crossterm_cursor/src/sys/mod.rs @@ -12,4 +12,4 @@ pub use self::winapi::get_cursor_position; #[cfg(unix)] pub use self::unix::show_cursor; #[cfg(windows)] -pub use self::winapi::show_cursor; \ No newline at end of file +pub use self::winapi::show_cursor; diff --git a/crossterm_cursor/src/sys/unix.rs b/crossterm_cursor/src/sys/unix.rs index 0eb14d0..557491d 100644 --- a/crossterm_cursor/src/sys/unix.rs +++ b/crossterm_cursor/src/sys/unix.rs @@ -1,4 +1,7 @@ -use crossterm_utils::{Result, sys::unix::{self, RAW_MODE_ENABLED}}; +use crossterm_utils::{ + sys::unix::{self, RAW_MODE_ENABLED}, + Result, +}; use std::io::{self, BufRead, Write}; #[cfg(unix)] @@ -22,8 +25,7 @@ pub fn get_cursor_position() -> (u16, u16) { pub fn show_cursor(show_cursor: bool) -> Result<()> { if show_cursor { write_cout!(csi!("?25h"))?; - } - else { + } else { write_cout!(csi!("?25l"))?; } Ok(()) diff --git a/crossterm_cursor/src/sys/winapi.rs b/crossterm_cursor/src/sys/winapi.rs index e8b1af1..5037194 100644 --- a/crossterm_cursor/src/sys/winapi.rs +++ b/crossterm_cursor/src/sys/winapi.rs @@ -10,7 +10,7 @@ pub fn get_cursor_position() -> (u16, u16) { } #[cfg(windows)] -pub fn show_cursor(show_cursor: bool) -> Result<()> { +pub fn show_cursor(show_cursor: bool) -> Result<()> { Cursor::from(Handle::current_out_handle()?).set_visibility(show_cursor) } diff --git a/crossterm_input/src/input/unix_input.rs b/crossterm_input/src/input/unix_input.rs index d0d1e66..eb2857f 100644 --- a/crossterm_input/src/input/unix_input.rs +++ b/crossterm_input/src/input/unix_input.rs @@ -2,7 +2,7 @@ use super::*; use crate::sys::unix::{get_tty, read_char_raw}; -use crossterm_utils::{csi, write_cout, Result, ErrorKind}; +use crossterm_utils::{csi, write_cout, ErrorKind, Result}; use std::char; use std::sync::atomic::{AtomicBool, Ordering}; use std::{ diff --git a/crossterm_style/Cargo.toml b/crossterm_style/Cargo.toml index d516bcf..1423690 100644 --- a/crossterm_style/Cargo.toml +++ b/crossterm_style/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crossterm_style" -version = "0.3.4" +version = "0.4.0" authors = ["T. Post"] description = "A cross-platform library styling the terminal output." repository = "https://github.com/TimonPost/crossterm" diff --git a/crossterm_style/src/ansi_color.rs b/crossterm_style/src/ansi_color.rs index e96c6b3..132c435 100644 --- a/crossterm_style/src/ansi_color.rs +++ b/crossterm_style/src/ansi_color.rs @@ -2,7 +2,7 @@ //! This module is used for Windows 10 terminals and Unix terminals by default. use crate::{Attribute, Color, ITerminalColor}; -use crossterm_utils::{Result, write_cout}; +use crossterm_utils::{write_cout, Result}; use crate::Colored; use std::io::Write;