Merge branch 'master' into development
This commit is contained in:
commit
9bda408e43
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "crossterm"
|
name = "crossterm"
|
||||||
version = "0.4.0"
|
version = "0.4.1"
|
||||||
authors = ["T. Post"]
|
authors = ["T. Post"]
|
||||||
description = "An crossplatform terminal library for manipulating terminals."
|
description = "An crossplatform terminal library for manipulating terminals."
|
||||||
repository = "https://github.com/TimonPost/crossterm"
|
repository = "https://github.com/TimonPost/crossterm"
|
||||||
|
@ -32,7 +32,7 @@ This crate supports all unix and windows terminals down to windows 7 (not all te
|
|||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
This documentation is only for Crossterm version `0.4.0` if you have an older version of Crossterm I suggest you check the [Upgrade Manual](https://github.com/TimonPost/crossterm/blob/master/docs/UpgradeManual.md) for more information about how to upgrade to a newer version.
|
This documentation is only for Crossterm version `0.4.*` if you have an older version of Crossterm I suggest you check the [Upgrade Manual](https://github.com/TimonPost/crossterm/blob/master/docs/UpgradeManual.md) for more information about how to upgrade to a newer version.
|
||||||
Also check out the [examples](https://github.com/TimonPost/crossterm/tree/master/examples) folders which detailed examples for all functionality of this crate.
|
Also check out the [examples](https://github.com/TimonPost/crossterm/tree/master/examples) folders which detailed examples for all functionality of this crate.
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
# Bug fix crossterm to 0.4.1
|
||||||
|
- Fixed resizing of ansi terminal with and height where in the wrong order.
|
||||||
|
|
||||||
# Features / Fixes in crossterm 0.4.0
|
# Features / Fixes in crossterm 0.4.0
|
||||||
- Input support (read_line, read_char, read_async, read_until_async)
|
- Input support (read_line, read_char, read_async, read_until_async)
|
||||||
- Styling module improved
|
- Styling module improved
|
||||||
|
@ -16,31 +16,21 @@ impl IStdout for AnsiOutput {
|
|||||||
fn write_str(&self, string: &str) -> io::Result<usize> {
|
fn write_str(&self, string: &str) -> io::Result<usize> {
|
||||||
let out = &self.handle;
|
let out = &self.handle;
|
||||||
let mut handle = out.lock();
|
let mut handle = out.lock();
|
||||||
write!(handle, "{}", string)?;
|
let amt = handle.write(string.as_bytes())?;
|
||||||
handle.flush();
|
handle.flush()?;
|
||||||
Ok(0)
|
Ok(amt)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write(&self, buf: &[u8]) -> io::Result<usize> {
|
fn write(&self, buf: &[u8]) -> io::Result<usize> {
|
||||||
let out = &self.handle;
|
let out = &self.handle;
|
||||||
let mut handle = out.lock();
|
let mut handle = out.lock();
|
||||||
handle.write(buf)?;
|
handle.write(buf)
|
||||||
Ok(0)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn flush(&self) -> io::Result<()> {
|
fn flush(&self) -> io::Result<()> {
|
||||||
let out = &self.handle;
|
let out = &self.handle;
|
||||||
let mut handle = out.lock();
|
let mut handle = out.lock();
|
||||||
handle.flush();
|
handle.flush()
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn as_any(&self) -> &Any {
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
fn as_any_mut(&mut self) -> &mut Any {
|
|
||||||
self
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,4 @@ trait IStdout {
|
|||||||
fn write(&self, buf: &[u8]) -> io::Result<usize>;
|
fn write(&self, buf: &[u8]) -> io::Result<usize>;
|
||||||
/// Flush the current output.
|
/// Flush the current output.
|
||||||
fn flush(&self) -> io::Result<()>;
|
fn flush(&self) -> io::Result<()>;
|
||||||
|
|
||||||
fn as_any(&self) -> &Any;
|
|
||||||
fn as_any_mut(&mut self) -> &mut Any;
|
|
||||||
}
|
}
|
||||||
|
@ -67,13 +67,6 @@ impl TerminalOutput {
|
|||||||
pub fn write_buf(&self, buf: &[u8]) -> io::Result<usize> {
|
pub fn write_buf(&self, buf: &[u8]) -> io::Result<usize> {
|
||||||
self.stdout.write(buf)
|
self.stdout.write(buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn as_any(&self) -> &Any {
|
|
||||||
self.stdout.as_any()
|
|
||||||
}
|
|
||||||
pub fn as_any_mut(&mut self) -> &mut Any {
|
|
||||||
self.stdout.as_any_mut()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for TerminalOutput
|
impl Default for TerminalOutput
|
||||||
|
@ -33,14 +33,6 @@ impl IStdout for WinApiOutput {
|
|||||||
fn flush(&self) -> io::Result<()> {
|
fn flush(&self) -> io::Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn as_any(&self) -> &Any {
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
fn as_any_mut(&mut self) -> &mut Any {
|
|
||||||
self
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe impl Send for WinApiOutput {}
|
unsafe impl Send for WinApiOutput {}
|
||||||
|
Loading…
Reference in New Issue
Block a user