Skip to content

Commit 7bb5257

Browse files
authored
Merge pull request #3924 from lkk214/fix/lookup-is-selected
fix: Autocomplete not working when lookup is selected
2 parents 46ffc40 + a8074b1 commit 7bb5257

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteLookupListener.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ class AutocompleteLookupListener(project: Project) : LookupManagerListener {
2929
newLookup.addLookupListener(
3030
object : LookupListener {
3131
override fun lookupShown(event: LookupEvent) {
32-
super.lookupShown(event)
32+
isLookupShown.set(false)
3333
ApplicationManager.getApplication().invokeLater {
34-
isLookupShown.set(false)
3534
event.lookup.editor.project?.service<AutocompleteService>()?.hideCompletions(newEditor)
3635
}
3736
}
3837

3938
override fun lookupCanceled(event: LookupEvent) {
40-
super.lookupCanceled(event)
41-
ApplicationManager.getApplication().invokeLater {
42-
isLookupShown.set(true)
43-
}
39+
isLookupShown.set(true)
40+
}
41+
42+
override fun itemSelected(event: LookupEvent) {
43+
isLookupShown.set(true)
4444
}
4545
})
4646
}

0 commit comments

Comments
 (0)