Retain the query entered into the TUI ()

If no results are found, and the user presses enter, keep the query!

Resolves 
This commit is contained in:
Ellie Huxtable 2021-05-08 22:10:40 +01:00 committed by GitHub
parent bb086808b1
commit 07c5461013
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) => {