editor: Trigger completions on paste

Co-authored-by: Cole Miller <cole@zed.dev>
This commit is contained in:
Agus Zubiaga 2025-08-13 14:00:42 -03:00
parent 46ed71fb9a
commit 1aef322d1b

View file

@ -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::<usize>(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);
});
}