From 07c54610138fb23cc71bb61516539cf67574e19c Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Sat, 8 May 2021 22:10:40 +0100 Subject: Retain the query entered into the TUI (#76) If no results are found, and the user presses enter, keep the query! Resolves #73 --- src/command/search.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/search.rs b/src/command/search.rs index 93f7451f..af2a1e43 100644 --- a/src/command/search.rs +++ b/src/command/search.rs @@ -160,7 +160,7 @@ async fn key_handler( return Some( app.results .get(i) - .map_or("".to_string(), |h| h.command.clone()), + .map_or(app.input.clone(), |h| h.command.clone()), ); } Key::Char(c) => { -- cgit v1.2.3