From acfdba68faaef9a37f6b1d8b0f576c400006ce1d Mon Sep 17 00:00:00 2001 From: Zhiming Ma Date: Fri, 8 Sep 2023 12:06:00 +0800 Subject: [PATCH] fix(vscode): do not show inline completion when autocomplete widget is visible. (#414) --- clients/vscode/src/TabbyCompletionProvider.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clients/vscode/src/TabbyCompletionProvider.ts b/clients/vscode/src/TabbyCompletionProvider.ts index 638eea3..5cc5c18 100644 --- a/clients/vscode/src/TabbyCompletionProvider.ts +++ b/clients/vscode/src/TabbyCompletionProvider.ts @@ -39,6 +39,12 @@ export class TabbyCompletionProvider implements InlineCompletionItemProvider { return emptyResponse; } + // Check if autocomplete widget is visible + if (context.selectedCompletionInfo !== undefined) { + console.debug("Autocomplete widget is visible, skipping."); + return emptyResponse; + } + const replaceRange = this.calculateReplaceRange(document, position); if (this.pendingCompletion) {