Don't show empty documentation labels in completions menu (#3632)

This PR fixes an issue where we would sometimes have extra blank lines
in the completions menu.

This was due to some items including documentation labels that were
empty strings.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2023-12-13 14:15:03 -05:00 committed by GitHub
parent fd428dfa66
commit 9a7de98242
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1250,6 +1250,7 @@ impl CompletionsMenu {
let documentation_label =
if let Some(Documentation::SingleLine(text)) = documentation {
Some(SharedString::from(text.clone()))
.filter(|text| !text.trim().is_empty())
} else {
None
};