From 8bad05a4ba09be2372a4c376fc2a2f585067775b Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 8 Feb 2022 12:37:20 -0800 Subject: [PATCH] Don't populate editor's context menu state if there are no completions This would accidentally stop the enter key from working. --- crates/editor/src/editor.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 5c2f00e2b3..9f2988ada9 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -1886,6 +1886,9 @@ impl Editor { let task = cx.spawn_weak(|this, mut cx| { async move { let completions = completions.await?; + if completions.is_empty() { + return Ok(()); + } let mut menu = CompletionsMenu { id,