fix: code completion state when session contains remining completion

This commit is contained in:
Carl-Robert Linnupuu 2024-11-01 14:27:18 +00:00
parent 7d53c36b1c
commit 96e4467b57

View file

@ -96,7 +96,14 @@ class DebouncedCodeCompletionProvider : DebouncedInlineCompletionProvider() {
null -> false
}
return event is InlineCompletionEvent.DocumentChange && codeCompletionsEnabled
if (!codeCompletionsEnabled) {
return false
}
val containsActiveCompletion =
REMAINING_EDITOR_COMPLETION.get(event.toRequest()?.editor)?.isNotEmpty() ?: false
return event is InlineCompletionEvent.DocumentChange || containsActiveCompletion
}
private fun ProducerScope<InlineCompletionElement>.getEventListener(