This commit is contained in:
Timon 2021-08-23 19:07:55 +02:00 committed by GitHub
parent 91564b5868
commit f909b3db95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,8 @@
# Version 0.21
- Expose `is_raw` function.
- Add 'purge' option on unix system, this clears the entire screen buffer.
- Improve serialisation for color enum values.
# Version 0.20
- Update from signal-hook with 'mio-feature flag' to signal-hook-mio 0.2.1.
- Manually implements Eq, PartialEq and Hash for KeyEvent improving equality checks and hash calculation.

View File

@ -1,6 +1,6 @@
[package]
name = "crossterm"
version = "0.20.0"
version = "0.21.0"
authors = ["T. Post"]
description = "A crossplatform terminal library for manipulating terminals."
repository = "https://github.com/crossterm-rs/crossterm"

View File

@ -43,7 +43,7 @@ impl InternalEventReader {
F: Filter,
{
for event in &self.events {
if filter.eval(&event) {
if filter.eval(event) {
return Ok(true);
}
}

View File

@ -74,6 +74,9 @@ pub(crate) fn clear(clear_type: ClearType) -> Result<()> {
ClearType::FromCursorUp => clear_before_cursor(pos, buffer_size, current_attribute)?,
ClearType::CurrentLine => clear_current_line(pos, buffer_size, current_attribute)?,
ClearType::UntilNewLine => clear_until_line(pos, buffer_size, current_attribute)?,
_ => {
clear_entire_screen(buffer_size, current_attribute)?;
} //TODO: make purge flush the entire screen buffer not just the visible window.
};
Ok(())
}