From 7f2f7c34a1d174d46bb8e44c238a572a1d8917b9 Mon Sep 17 00:00:00 2001 From: Jack Wills <32690432+mrjackwills@users.noreply.github.com> Date: Thu, 2 May 2024 13:57:02 +0000 Subject: [PATCH] feat: "esc" key function in help box --- src/exec.rs | 3 +-- src/ui/draw_blocks.rs | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/exec.rs b/src/exec.rs index 8af447b..2f3a9d2 100644 --- a/src/exec.rs +++ b/src/exec.rs @@ -84,13 +84,12 @@ pub fn tty_readable() -> bool { .is_ok() } - struct AsyncTTY { rx: std::sync::mpsc::Receiver, } 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) { loop { let mut buf = [0]; diff --git a/src/ui/draw_blocks.rs b/src/ui/draw_blocks.rs index 002c6ef..ce4188a 100644 --- a/src/ui/draw_blocks.rs +++ b/src/ui/draw_blocks.rs @@ -705,6 +705,11 @@ impl HelpInfo { button_item("1 - 9"), button_desc("sort by header - or click header"), ]), + Line::from(vec![ + space(), + button_item("esc"), + button_desc("close dialog"), + ]), Line::from(vec![ space(), button_item("q"),