Skip to content

Commit f909b3d

Browse files
authored
0.21 (#596)
1 parent 91564b5 commit f909b3d

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

CHANGELOG.md

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

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "crossterm"
3-
version = "0.20.0"
3+
version = "0.21.0"
44
authors = ["T. Post"]
55
description = "A crossplatform terminal library for manipulating terminals."
66
repository = "https://github.com/crossterm-rs/crossterm"

src/event/read.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl InternalEventReader {
4343
F: Filter,
4444
{
4545
for event in &self.events {
46-
if filter.eval(&event) {
46+
if filter.eval(event) {
4747
return Ok(true);
4848
}
4949
}

src/terminal/sys/windows.rs

+3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ pub(crate) fn clear(clear_type: ClearType) -> Result<()> {
7474
ClearType::FromCursorUp => clear_before_cursor(pos, buffer_size, current_attribute)?,
7575
ClearType::CurrentLine => clear_current_line(pos, buffer_size, current_attribute)?,
7676
ClearType::UntilNewLine => clear_until_line(pos, buffer_size, current_attribute)?,
77+
_ => {
78+
clear_entire_screen(buffer_size, current_attribute)?;
79+
} //TODO: make purge flush the entire screen buffer not just the visible window.
7780
};
7881
Ok(())
7982
}

0 commit comments

Comments
 (0)