Fixed additionnal space in command autocomplete

This commit is contained in:
Justine
2023-02-04 23:45:43 +01:00
parent b31e3d4be4
commit 90640d4e51

View File

@ -94,13 +94,20 @@ impl Search {
} }
}; };
let xxx = &self.search_path.clone().into_os_string().into_string().unwrap(); match &self.search_type {
if !&self.local_search && !res.contains(&xxx.as_str()) { SearchType::FileSearch => {
let return_val = format!("{} {}{}", &self.command, &self.search_path.display(), res); let xxx = &self.search_path.clone().into_os_string().into_string().unwrap();
return(return_val, res_lines); if !&self.local_search && !res.contains(&xxx.as_str()) {
} else { let return_val = format!("{} {}{}", &self.command, &self.search_path.display(), res);
let return_val = format!("{} {}", &self.command, res); return(return_val, res_lines);
return(return_val, res_lines); } else {
let return_val = format!("{} {}", &self.command, res);
return(return_val, res_lines);
}
},
SearchType::CmdSearch => {
return (res, res_lines);
},
} }
} }