From b4c8e0454423d2ae21113c0519d47a47bebb2209 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 12 Dec 2024 17:23:22 +0100 Subject: [PATCH] Clear completion if model doesn't produce any edit (#21925) Release Notes: - N/A --- crates/zeta/src/zeta.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/zeta/src/zeta.rs b/crates/zeta/src/zeta.rs index 8912cba17205bcbe5fb456cb54bc7a2178c979cd..9784653a53f5c4f0ccec1c520411fc0ec18a3425 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(); }) });