This commit is contained in:
Hayder Hassan 2026-05-31 02:53:19 +01:00 committed by GitHub
commit fe4604ae8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -310,9 +310,15 @@ impl Editor {
drop(multibuffer_snapshot);
let is_showing_snippet_choices = matches!(
completions_source,
Some(CompletionsMenuSource::SnippetChoices)
);
// Hide the current completions menu when query is empty. Without this, cached
// completions from before the trigger char may be reused (#32774).
if query.is_none() && menu_is_open {
// completions from before the trigger char may be reused (#32774). Keep snippet
// choice menus open so choice placeholders remain visible after snippet insertion.
if query.is_none() && menu_is_open && !is_showing_snippet_choices {
self.hide_context_menu(window, cx);
}