mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-16 15:11:25 +00:00
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:
parent
fd428dfa66
commit
9a7de98242
1 changed files with 1 additions and 0 deletions
|
@ -1250,6 +1250,7 @@ impl CompletionsMenu {
|
||||||
let documentation_label =
|
let documentation_label =
|
||||||
if let Some(Documentation::SingleLine(text)) = documentation {
|
if let Some(Documentation::SingleLine(text)) = documentation {
|
||||||
Some(SharedString::from(text.clone()))
|
Some(SharedString::from(text.clone()))
|
||||||
|
.filter(|text| !text.trim().is_empty())
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue