summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2021-05-08 22:10:40 +0100
committerGitHub <noreply@github.com>2021-05-08 22:10:40 +0100
commit07c54610138fb23cc71bb61516539cf67574e19c (patch)
tree89c053cd44007bc760120d1f5a846621b56e6f73
parentbb086808b1461a586ca249e312d5122c7da3c9c6 (diff)
Retain the query entered into the TUI (#76)
If no results are found, and the user presses enter, keep the query! Resolves #73
-rw-r--r--src/command/search.rs2
1 files changed, 1 insertions, 1 deletions
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) => {