From f0565b4e2e739bdac77771da49eaacbc2f549d88 Mon Sep 17 00:00:00 2001 From: Bennet Bo Fenner Date: Fri, 7 Feb 2025 18:02:14 +0100 Subject: [PATCH] edit prediction: Do not show icon as disabled when there is no buffer open (#24458) Release Notes: - N/A --- .../src/inline_completion_button.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/inline_completion_button/src/inline_completion_button.rs b/crates/inline_completion_button/src/inline_completion_button.rs index 5ba3d52772..a28cfe99c1 100644 --- a/crates/inline_completion_button/src/inline_completion_button.rs +++ b/crates/inline_completion_button/src/inline_completion_button.rs @@ -229,7 +229,7 @@ impl Render for InlineCompletionButton { return div(); } - let enabled = self.editor_enabled.unwrap_or(false); + let enabled = self.editor_enabled.unwrap_or(true); let zeta_icon = if enabled { IconName::ZedPredict @@ -469,9 +469,7 @@ impl InlineCompletionButton { }), ); - if self.file.as_ref().map_or(false, |file| { - !all_language_settings(Some(file), cx).inline_completions_enabled_for_path(file.path()) - }) { + if !self.editor_enabled.unwrap_or(true) { menu = menu.item( ContextMenuEntry::new("This file is excluded.") .disabled(true)