Don't populate editor's context menu state if there are no completions

This would accidentally stop the enter key from working.
This commit is contained in:
Max Brunsfeld 2022-02-08 12:37:20 -08:00
parent 36ff31858b
commit 8bad05a4ba

View file

@ -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,