Fixed autocomplete for the case where search string gives nothing on a file search

This commit is contained in:
Justine 2023-02-08 23:46:19 +01:00
parent cfc052a65a
commit 344f14c86f

View File

@ -189,8 +189,7 @@ fn autocomplete_file(search: &Search) -> std::io::Result<(String, String)> {
}
if nbr_found == 0 {
let ret_val = format!("{}{}", &search.command, &search.searchee);
return Ok((ret_val, String::new()));
*&mut last_found = search.searchee.clone();
}
//Handle the path when tabbing in a long path, zsh-like