Minor upgrade to crossterm 0.28 (#898)
This commit is contained in:
parent
25e14782e3
commit
5d50d8da62
2
.github/workflows/crossterm_test.yml
vendored
2
.github/workflows/crossterm_test.yml
vendored
@ -68,7 +68,7 @@ jobs:
|
|||||||
continue-on-error: ${{ matrix.can-fail }}
|
continue-on-error: ${{ matrix.can-fail }}
|
||||||
- name: Test no default features with use-dev-tty feature enabled
|
- name: Test no default features with use-dev-tty feature enabled
|
||||||
if: matrix.os != 'windows-2019'
|
if: matrix.os != 'windows-2019'
|
||||||
run: cargo test --no-default-features --features "use-dev-tty events" -- --nocapture --test-threads 1
|
run: cargo test --no-default-features --features "use-dev-tty events bracketed-paste" -- --nocapture --test-threads 1
|
||||||
continue-on-error: ${{ matrix.can-fail }}
|
continue-on-error: ${{ matrix.can-fail }}
|
||||||
- name: Test no default features with windows feature enabled
|
- name: Test no default features with windows feature enabled
|
||||||
if: matrix.os == 'windows-2019'
|
if: matrix.os == 'windows-2019'
|
||||||
|
23
CHANGELOG.md
23
CHANGELOG.md
@ -1,7 +1,26 @@
|
|||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
- Use Rustix by default instead of libc. Libc can be re-enabled if necessary with the libc feature flag.
|
# Version 0.28
|
||||||
|
|
||||||
|
## Added ⭐
|
||||||
|
|
||||||
|
- Capture double click mouse events on windows (#826)
|
||||||
|
- (De)serialize Reset color (#824)
|
||||||
|
- Add functions to allow constructing `Attributes` in a const context (#817)
|
||||||
|
- Implement `Display` for `KeyCode` and `KeyModifiers` (#862)
|
||||||
|
|
||||||
|
## Changed ⚙️
|
||||||
|
|
||||||
|
- Use Rustix by default instead of libc. Libc can be re-enabled if necessary with the `libc` feature flag (#892)
|
||||||
- `FileDesc` now requires a lifetime annotation.
|
- `FileDesc` now requires a lifetime annotation.
|
||||||
|
- Improve available color detection (#885)
|
||||||
|
- Speed up `SetColors` by ~15-25% (#879)
|
||||||
|
- Remove unsafe and unnecessary size argument from `FileDesc::read()` (#821)
|
||||||
|
|
||||||
|
## Breaking ⚠️
|
||||||
|
|
||||||
|
- Fix duplicate bit masks for caps lock and num lock (#863).
|
||||||
|
This breaks serialization of `KeyEventState`
|
||||||
|
|
||||||
# Version 0.27.1
|
# Version 0.27.1
|
||||||
|
|
||||||
@ -18,7 +37,7 @@
|
|||||||
- Add `window_size` function to fetch pixel width/height of screen for more sophisticated rendering in terminals.
|
- Add `window_size` function to fetch pixel width/height of screen for more sophisticated rendering in terminals.
|
||||||
- Add support for deserializing hex color strings to `Color` e.g #fffff.
|
- Add support for deserializing hex color strings to `Color` e.g #fffff.
|
||||||
|
|
||||||
## Changes
|
## Changed ⚙️
|
||||||
|
|
||||||
- Make the events module an optional feature `events` (to make crossterm more lightweight) (#776)
|
- Make the events module an optional feature `events` (to make crossterm more lightweight) (#776)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "crossterm"
|
name = "crossterm"
|
||||||
version = "0.27.0"
|
version = "0.28.0"
|
||||||
authors = ["T. Post"]
|
authors = ["T. Post"]
|
||||||
description = "A crossplatform terminal library for manipulating terminals."
|
description = "A crossplatform terminal library for manipulating terminals."
|
||||||
repository = "https://github.com/crossterm-rs/crossterm"
|
repository = "https://github.com/crossterm-rs/crossterm"
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
//! Blocking read:
|
//! Blocking read:
|
||||||
//!
|
//!
|
||||||
//! ```no_run
|
//! ```no_run
|
||||||
|
//! #![cfg(feature = "bracketed-paste")]
|
||||||
//! use crossterm::{
|
//! use crossterm::{
|
||||||
//! event::{
|
//! event::{
|
||||||
//! read, DisableBracketedPaste, DisableFocusChange, DisableMouseCapture, EnableBracketedPaste,
|
//! read, DisableBracketedPaste, DisableFocusChange, DisableMouseCapture, EnableBracketedPaste,
|
||||||
@ -68,6 +69,7 @@
|
|||||||
//! Non-blocking read:
|
//! Non-blocking read:
|
||||||
//!
|
//!
|
||||||
//! ```no_run
|
//! ```no_run
|
||||||
|
//! #![cfg(feature = "bracketed-paste")]
|
||||||
//! use std::{time::Duration, io};
|
//! use std::{time::Duration, io};
|
||||||
//!
|
//!
|
||||||
//! use crossterm::{
|
//! use crossterm::{
|
||||||
|
@ -162,7 +162,7 @@ pub(crate) fn set_size(width: u16, height: u16) -> std::io::Result<()> {
|
|||||||
|
|
||||||
let width = width as i16;
|
let width = width as i16;
|
||||||
if current_size.width < window.left + width {
|
if current_size.width < window.left + width {
|
||||||
if window.left >= i16::max_value() - width {
|
if window.left >= i16::MAX - width {
|
||||||
return Err(io::Error::new(
|
return Err(io::Error::new(
|
||||||
io::ErrorKind::InvalidInput,
|
io::ErrorKind::InvalidInput,
|
||||||
"terminal width too large",
|
"terminal width too large",
|
||||||
@ -174,7 +174,7 @@ pub(crate) fn set_size(width: u16, height: u16) -> std::io::Result<()> {
|
|||||||
}
|
}
|
||||||
let height = height as i16;
|
let height = height as i16;
|
||||||
if current_size.height < window.top + height {
|
if current_size.height < window.top + height {
|
||||||
if window.top >= i16::max_value() - height {
|
if window.top >= i16::MAX - height {
|
||||||
return Err(io::Error::new(
|
return Err(io::Error::new(
|
||||||
io::ErrorKind::InvalidInput,
|
io::ErrorKind::InvalidInput,
|
||||||
"terminal height too large",
|
"terminal height too large",
|
||||||
|
Loading…
Reference in New Issue
Block a user