Skip to content

Commit 3b3c081

Browse files
committed
fix increment logic when IntelliSense is showing up
1 parent 0b17ceb commit 3b3c081

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,9 @@ class CodeWhispererPopupIntelliSenseAcceptListener(private val states: Invocatio
2929
}
3030

3131
fun addIntelliSenseAcceptListener(lookup: Lookup, states: InvocationContext) {
32+
CodeWhispererPopupManager.getInstance().shouldEditorChangeCancelPopup++
33+
LOG.debug { "Incrementing shouldListenerCancelPopup semaphore value" }
3234
lookup.addLookupListener(object : LookupListener {
33-
override fun lookupShown(event: LookupEvent) {
34-
CodeWhispererPopupManager.getInstance().shouldEditorChangeCancelPopup++
35-
LOG.debug { "Incrementing shouldListenerCancelPopup semaphore value" }
36-
super.lookupShown(event)
37-
}
38-
3935
override fun itemSelected(event: LookupEvent) {
4036
if (!CodeWhispererInvocationStatus.getInstance().isDisplaySessionActive() ||
4137
!(event.lookup as LookupImpl).isShown

0 commit comments

Comments
 (0)