Merge branch 'master' into master

This commit is contained in:
Twan Stok 2023-03-19 21:53:37 +01:00 committed by GitHub
commit 7b684e8313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 8 deletions

20
Cargo.lock generated
View File

@ -216,7 +216,7 @@ dependencies = [
"clap_mangen",
"concat-string",
"const_format",
"crossterm",
"crossterm 0.26.1",
"ctrlc",
"dirs",
"fern",
@ -473,6 +473,22 @@ dependencies = [
"winapi",
]
[[package]]
name = "crossterm"
version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a84cda67535339806297f1b331d6dd6320470d2a0fe65381e79ee9e156dd3d13"
dependencies = [
"bitflags",
"crossterm_winapi",
"libc",
"mio",
"parking_lot",
"signal-hook",
"signal-hook-mio",
"winapi",
]
[[package]]
name = "crossterm_winapi"
version = "0.9.0"
@ -1713,7 +1729,7 @@ checksum = "ccdd26cbd674007e649a272da4475fb666d3aa0ad0531da7136db6fab0e5bad1"
dependencies = [
"bitflags",
"cassowary",
"crossterm",
"crossterm 0.25.0",
"unicode-segmentation",
"unicode-width",
]

View File

@ -78,7 +78,7 @@ cfg-if = "1.0.0"
clap = { version = "3.2.2", features = ["default", "cargo", "wrap_help"] }
concat-string = "1.0.1"
const_format = "0.2.30"
crossterm = "0.25.0"
crossterm = "0.26.1"
ctrlc = { version = "3.2.5", features = ["termination"] }
dirs = "4.0.0"
fern = { version = "0.6.1", optional = true }

View File

@ -333,7 +333,7 @@ More details on configuration can be found [in the documentation](https://clemen
## Troubleshooting
If some things aren't working, give the [Troubleshooting page](https://clementtsang.github.io/bottom/nightly/troubleshooting) a look. If things still aren't
If some things aren't working, give the [troubleshooting page](https://clementtsang.github.io/bottom/nightly/troubleshooting) a look. If things still aren't
working, then consider opening [a question](https://github.com/ClementTsang/bottom/discussions) or filing a [bug report](https://github.com/ClementTsang/bottom/issues/new/choose).
## Contribution
@ -421,4 +421,4 @@ Thanks to all contributors:
work of many talented people. This application would be impossible without their
work. I used to thank them all individually but the list got too large...
- And of course, another round of thanks to all contributors and package maintainers!
- And of course, another round of thanks to all the contributors and package maintainers!

View File

@ -1,5 +1,5 @@
mkdocs == 1.4.2
mkdocs-material == 9.1.0
mkdocs-material == 9.1.3
mkdocs-material-extensions == 1.1.1
mdx_truly_sane_lists == 1.3
mike == 1.1.2

View File

@ -40,7 +40,7 @@ use constants::*;
use crossterm::{
event::{
poll, read, DisableBracketedPaste, DisableMouseCapture, Event, KeyCode, KeyEvent,
KeyModifiers, MouseEvent, MouseEventKind,
KeyEventKind, KeyModifiers, MouseEvent, MouseEventKind,
},
execute,
style::Print,
@ -448,7 +448,9 @@ pub fn create_input_thread(
break;
}
}
Event::Key(key) => {
Event::Key(key) if key.kind == KeyEventKind::Press => {
// For now, we only care about keydown events. This may change in the future.
if sender.send(BottomEvent::KeyInput(key)).is_err() {
break;
}