IJPL-199180 don't cancel lookup by actionTracker if the popup is shown already

GitOrigin-RevId: 2ad5df41b5a01bac56b07680fd2a51777f1e5c0c
This commit is contained in:
Max Medvedev
2025-09-05 09:58:32 +00:00
committed by intellij-monorepo-bot
parent cb4255e2ca
commit 5937e75ada
@@ -278,8 +278,9 @@ sealed class CompletionPhase @ApiStatus.Internal constructor(
return
}
if (phase.myTracker.hasAnythingHappened()) {
// activity has happened in the editor. We must cancel all the requests altogether
if (phase.myTracker.hasAnythingHappened() && (phase.indicator == null || !phase.indicator.lookup.isShown)) {
// activity has happened in the editor. We must cancel all the requests altogether.
// but we want to do this only if lookup is not shown yet. because if it's shown, the lookup is going to handle close by itself.
LOG.trace { "Setting NoCompletion phase :: completionEditor=$completionEditor, expirationReason=${phase.myTracker.describeChangeEvent()}" }
phase.cancelPhase()
CompletionServiceImpl.setCompletionPhase(NoCompletion)