Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
edit prediction: Do not request a completion if edits can be interpolated (#23908)
Bennet Bo Fenner48dba9a9d9c9
diff --git a/crates/zeta/src/zeta.rs b/crates/zeta/src/zeta.rsindex 074be523bbe..99fae6600f5 100644--- a/crates/zeta/src/zeta.rs+++ b/crates/zeta/src/zeta.rs@@ -1349,6 +1349,17 @@ impl inline_completion::InlineCompletionProvider for ZetaInlineCompletionProvidereturn;}+ if let Some(current_completion) = self.current_completion.as_ref() {+ let snapshot = buffer.read(cx).snapshot();+ if current_completion+ .completion+ .interpolate(&snapshot)+ .is_some()+ {+ return;+ }+ }+let pending_completion_id = self.next_pending_completion_id;self.next_pending_completion_id += 1;