From 9a7de98242b86688741445415f4eecaee3e63cf9 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Wed, 13 Dec 2023 14:15:03 -0500 Subject: [PATCH] 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 --- crates/editor2/src/editor.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 76085aeca854be6dbfc5954052289ac810a3753b..0d19b53d29fbe71e6e893ed6b2953bd136dd1986 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -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 };