From 1aef322d1b66006757f4a7ce8b36f8d1d9db045e Mon Sep 17 00:00:00 2001 From: Agus Zubiaga Date: Wed, 13 Aug 2025 14:00:42 -0300 Subject: [PATCH] editor: Trigger completions on paste Co-authored-by: Cole Miller --- crates/editor/src/editor.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index d1bf95c794..c421e1fec1 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -12158,6 +12158,8 @@ impl Editor { let clipboard_text = Cow::Borrowed(text); self.transact(window, cx, |this, window, cx| { + let had_active_edit_prediction = this.has_active_edit_prediction(); + if let Some(mut clipboard_selections) = clipboard_selections { let old_selections = this.selections.all::(cx); let all_selections_were_entire_line = @@ -12230,6 +12232,11 @@ impl Editor { } else { this.insert(&clipboard_text, window, cx); } + + let trigger_in_words = + this.show_edit_predictions_in_menu() || !had_active_edit_prediction; + + this.trigger_completion_on_input(&text, trigger_in_words, window, cx); }); }