Skip to content

Commit 58947d4

Browse files
committed
use offset
1 parent 995c0b7 commit 58947d4

File tree

1 file changed

+3
-1
lines changed
  • plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/popup

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,9 @@ class QInlineCompletionProvider(private val cs: CoroutineScope) : InlineCompleti
404404
CodeWhispererInvocationStatus.getInstance().setIsInvokingQInline(session, false)
405405
}
406406

407-
if (request.event is InlineCompletionEvent.Backspace) {
407+
// ideally we want to use if (request.event is InlineCompletionEvent.Backspace) {
408+
// but this API is marked as experimental and it will not compile on 2024.2
409+
if (request.startOffset == request.endOffset) {
408410
logInline(triggerSessionId) {
409411
"Skip inline completion when deleting"
410412
}

0 commit comments

Comments
 (0)