From 035e463addff0d3ef78dd980565e963627309e80 Mon Sep 17 00:00:00 2001 From: afonsofrancof Date: Mon, 23 Sep 2024 04:54:15 +0100 Subject: [PATCH] Restore behaviour of closing the pop-up with "q" 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? --- 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 1f5b56c0a..9bb4d907d 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 2cd638240..ee4700aa9 100644 --- a/tui/src/floating_text.rs +++ b/tui/src/floating_text.rs @@ -301,7 +301,7 @@ impl FloatContent for FloatingText { Shortcut::new(vec!["k", "Up"], "Scroll up"), Shortcut::new(vec!["h", "Left"], "Scroll left"), Shortcut::new(vec!["l", "Right"], "Scroll right"), - Shortcut::new(vec!["Enter", "p", "d", "g"], "Close window"), + Shortcut::new(vec!["Enter", "p", "q", "d", "g"], "Close window"), ], } }