From 8111649c8ccfeec0f907660353f376f9fd04b00a Mon Sep 17 00:00:00 2001 From: "Afonso Franco F." Date: Mon, 30 Sep 2024 21:12:16 +0100 Subject: [PATCH] Restore behaviour of closing the pop-up with "q" (#634) I am so used to pressing q to quit everything. Let me know if this is not desired, because I remember using it a lot, so if it was removed maybe there was a reason? Co-authored-by: Chris Titus --- tui/src/float.rs | 1 + tui/src/floating_text.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tui/src/float.rs b/tui/src/float.rs index 1a12d6b1..b4ab0344 100644 --- a/tui/src/float.rs +++ b/tui/src/float.rs @@ -60,6 +60,7 @@ impl Float { | KeyCode::Char('p') | KeyCode::Char('d') | KeyCode::Char('g') + | KeyCode::Char('q') | KeyCode::Esc if self.content.is_finished() => { diff --git a/tui/src/floating_text.rs b/tui/src/floating_text.rs index fefe9b9a..52e0c50c 100644 --- a/tui/src/floating_text.rs +++ b/tui/src/floating_text.rs @@ -298,7 +298,7 @@ impl FloatContent for FloatingText { Shortcut::new("Scroll up", ["k", "Up"]), Shortcut::new("Scroll left", ["h", "Left"]), Shortcut::new("Scroll right", ["l", "Right"]), - Shortcut::new("Close window", ["Enter", "p", "d", "g"]), + Shortcut::new("Close window", ["Enter", "p", "q", "d", "g"]), ]), ) }