Skip to content

Commit 0d97099

Browse files
committed
skip inline completion when deleting
1 parent c223196 commit 0d97099

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Skip inline completion when deleting characters"
4+
}

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/popup/QInlineCompletionProvider.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,14 @@ class QInlineCompletionProvider(private val cs: CoroutineScope) : InlineCompleti
404404
CodeWhispererInvocationStatus.getInstance().setIsInvokingQInline(session, false)
405405
}
406406

407+
if (request.event is InlineCompletionEvent.Backspace) {
408+
logInline(triggerSessionId) {
409+
"Skip inline completion when deleting"
410+
}
411+
return InlineCompletionSuggestion.Empty
412+
}
413+
414+
407415
val sessionContext = InlineCompletionSessionContext(triggerOffset = request.endOffset)
408416

409417
// Pagination workaround: Always return exactly 5 variants

0 commit comments

Comments
 (0)