inline completion: Respect `disabled_globs` when manually requesting completions (#24121)

Bennet Bo Fenner created

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`)

Change summary

crates/editor/src/editor.rs | 4 ++++
1 file changed, 4 insertions(+)

Detailed changes

crates/editor/src/editor.rs 🔗

@@ -4758,6 +4758,10 @@ impl Editor {
         window: &mut Window,
         cx: &mut Context<Self>,
     ) {
+        if !self.inline_completions_enabled(cx) {
+            return;
+        }
+
         if !self.has_active_inline_completion() {
             self.refresh_inline_completion(false, true, window, cx);
             return;