From eb820ab800ea2a0023667b5c0eb91daa7c9ab084 Mon Sep 17 00:00:00 2001 From: Bennet Bo Fenner Date: Mon, 3 Feb 2025 09:54:24 +0100 Subject: [PATCH] inline completion: Respect `disabled_globs` when manually requesting completions (#24121) When requesting completions manually with `editor: Show inline completion`, we did not check if completions are actually disabled for the current file (`inline_completions > disabled_globs`) Release Notes: - Fixed an issue where the `inline_completions > disabled_globs` setting would not be respected when manually requesting a completion (`editor: Show inline completion`) --- crates/editor/src/editor.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index c3a7b20ec96266c73fb083c103ba67ea7b151dc3..9aeba2a22e52c55119a40536ea6d08e194149ac2 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -4758,6 +4758,10 @@ impl Editor { window: &mut Window, cx: &mut Context, ) { + if !self.inline_completions_enabled(cx) { + return; + } + if !self.has_active_inline_completion() { self.refresh_inline_completion(false, true, window, cx); return;