1
0
mirror of https://github.com/chylex/IntelliJ-Keyboard-Master.git synced 2025-05-02 11:34:06 +02:00

Fix code completion shortcuts not working when renaming elements due to missing focus

This commit is contained in:
chylex 2021-09-02 19:27:47 +02:00
parent 798264316b
commit a3c86f9abc
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548

View File

@ -1,5 +1,6 @@
package com.chylex.intellij.keyboardmaster.lookup
import com.intellij.codeInsight.lookup.LookupFocusDegree
import com.intellij.codeInsight.lookup.LookupManager
import com.intellij.codeInsight.lookup.impl.LookupImpl
import com.intellij.codeInsight.template.impl.editorActions.TypedActionHandlerBase
@ -46,6 +47,11 @@ class LookupTypedActionHandler(originalHandler: TypedActionHandler?) : TypedActi
lookup.refreshUi(false, true)
}
else {
if (!lookup.isFocused) {
lookup.lookupFocusDegree = LookupFocusDegree.FOCUSED
lookup.refreshUi(false, true)
}
lookup.selectedIndex = offset + shortcutItem - 1
}