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.

Clear completion if model doesn't produce any edit (#21925)

Antonio Scandurrab4c8e0454423
diff --git a/crates/zeta/src/zeta.rs b/crates/zeta/src/zeta.rs
index 8912cba1720..9784653a53f 100644
--- a/crates/zeta/src/zeta.rs
+++ b/crates/zeta/src/zeta.rs
@@ -965,7 +965,6 @@ impl inline_completion::InlineCompletionProvider for ZetaInlineCompletionProvide
}
this.update(&mut cx, |this, cx| {
- cx.notify();
this.first_pending_completion = None;
if !is_first {
this.last_pending_completion = None;
@@ -986,7 +985,11 @@ impl inline_completion::InlineCompletionProvider for ZetaInlineCompletionProvide
});
this.current_completion = Some(new_completion);
}
+ } else {
+ this.current_completion = None;
}
+
+ cx.notify();
})
});