From 75e8680f9e6ade2a3692d85e81ac682162da5597 Mon Sep 17 00:00:00 2001 From: arafatkatze Date: Wed, 1 Jan 2025 14:32:43 +0400 Subject: [PATCH] Fix: Respect autocomplete enabled setting for keyboard shortcut trigger --- .../autocomplete/action/TriggerAutocompleteActionHandler.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jetbrains/src/main/kotlin/com/sourcegraph/cody/autocomplete/action/TriggerAutocompleteActionHandler.kt b/jetbrains/src/main/kotlin/com/sourcegraph/cody/autocomplete/action/TriggerAutocompleteActionHandler.kt index d824bedc6e22..5cf849a26af7 100644 --- a/jetbrains/src/main/kotlin/com/sourcegraph/cody/autocomplete/action/TriggerAutocompleteActionHandler.kt +++ b/jetbrains/src/main/kotlin/com/sourcegraph/cody/autocomplete/action/TriggerAutocompleteActionHandler.kt @@ -13,7 +13,8 @@ class TriggerAutocompleteActionHandler : EditorActionHandler() { val logger = Logger.getInstance(TriggerAutocompleteActionHandler::class.java) override fun isEnabledForCaret(editor: Editor, caret: Caret, dataContext: DataContext): Boolean = - CodyEditorUtil.isEditorInstanceSupported(editor) + CodyEditorUtil.isEditorInstanceSupported(editor) && + CodyEditorUtil.isImplicitAutocompleteEnabledForEditor(editor) override fun doExecute(editor: Editor, caret: Caret?, dataContext: DataContext) { val offset = caret?.offset ?: editor.caretModel.currentCaret.offset