Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

completions: do not render empty multi-line documentation (#7279)

Thorsten Ball01ddf840f551
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index 86090b0f055..b244ba6d125 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -857,9 +857,15 @@ impl CompletionsMenu {
Some(Documentation::MultiLinePlainText(text)) => {
Some(div().child(SharedString::from(text.clone())))
}
- Some(Documentation::MultiLineMarkdown(parsed)) => Some(div().child(
- render_parsed_markdown("completions_markdown", parsed, &style, workspace, cx),
- )),
+ Some(Documentation::MultiLineMarkdown(parsed)) if !parsed.text.is_empty() => {
+ Some(div().child(render_parsed_markdown(
+ "completions_markdown",
+ parsed,
+ &style,
+ workspace,
+ cx,
+ )))
+ }
_ => None,
};
multiline_docs.map(|div| {