This commit is contained in:
Denis Isidoro 2020-03-14 15:34:26 -03:00 committed by GitHub
parent b809739113
commit 5423cd8ccb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,13 +152,15 @@ fn parse_output_single(mut text: String, suggestion_type: SuggestionType) -> Str
match (lines.get(0), lines.get(1), lines.get(2)) {
(Some(one), Some(termination), Some(two)) if *termination == "enter" => {
if two.is_empty() {
one.to_string()
(*one).to_string()
} else {
two.to_string()
(*two).to_string()
}
}
(Some(one), Some(termination), None) if *termination == "enter" => one.to_string(),
(Some(one), Some(termination), _) if *termination == "tab" => one.to_string(),
(Some(one), Some(termination), None) if *termination == "enter" => {
(*one).to_string()
}
(Some(one), Some(termination), _) if *termination == "tab" => (*one).to_string(),
_ => "".to_string(),
}
}