feat: "esc" key function in help box

This commit is contained in:
Jack Wills
2024-05-02 13:57:02 +00:00
parent 8bc328040e
commit 7f2f7c34a1
2 changed files with 6 additions and 2 deletions
+1 -2
View File
@@ -84,13 +84,12 @@ pub fn tty_readable() -> bool {
.is_ok() .is_ok()
} }
struct AsyncTTY { struct AsyncTTY {
rx: std::sync::mpsc::Receiver<u8>, rx: std::sync::mpsc::Receiver<u8>,
} }
impl AsyncTTY { impl AsyncTTY {
/// Use an async timeout to read data from the file, and send to the "main" thread /// Use an async timeout to read data from the file, and send to the "main" thread
async fn read_loop(mut f: File, tx: Sender<u8>) { async fn read_loop(mut f: File, tx: Sender<u8>) {
loop { loop {
let mut buf = [0]; let mut buf = [0];
+5
View File
@@ -705,6 +705,11 @@ impl HelpInfo {
button_item("1 - 9"), button_item("1 - 9"),
button_desc("sort by header - or click header"), button_desc("sort by header - or click header"),
]), ]),
Line::from(vec![
space(),
button_item("esc"),
button_desc("close dialog"),
]),
Line::from(vec![ Line::from(vec![
space(), space(),
button_item("q"), button_item("q"),