mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-04 10:12:47 +00:00
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:
parent
36ff31858b
commit
8bad05a4ba
1 changed files with 3 additions and 0 deletions
|
@ -1886,6 +1886,9 @@ impl Editor {
|
||||||
let task = cx.spawn_weak(|this, mut cx| {
|
let task = cx.spawn_weak(|this, mut cx| {
|
||||||
async move {
|
async move {
|
||||||
let completions = completions.await?;
|
let completions = completions.await?;
|
||||||
|
if completions.is_empty() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
let mut menu = CompletionsMenu {
|
let mut menu = CompletionsMenu {
|
||||||
id,
|
id,
|
||||||
|
|
Loading…
Reference in a new issue