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.

project: Set completion to undocumented if text empty (#11207)

Thorsten Ball73d0600ad2bb
diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs
index 29e8f7424b5..6f601e0ccee 100644
--- a/crates/project/src/project.rs
+++ b/crates/project/src/project.rs
@@ -5723,13 +5723,9 @@ impl Project {
return;
};
- if response.text.is_empty() {
- let mut completions = completions.write();
- let completion = &mut completions[completion_index];
- completion.documentation = Some(Documentation::Undocumented);
- }
-
- let documentation = if response.is_markdown {
+ let documentation = if response.text.is_empty() {
+ Documentation::Undocumented
+ } else if response.is_markdown {
Documentation::MultiLineMarkdown(
markdown::parse_markdown(&response.text, &language_registry, None).await,
)