1
0
mirror of https://github.com/chylex/IntelliJ-Keyboard-Master.git synced 2025-12-16 10:28:02 +01:00

Compare commits

..

2 Commits

Author SHA1 Message Date
21c74d8615 Release version 0.6.6 2025-12-05 01:05:09 +01:00
5c71108f49 Fix vim-style bindings sometimes stealing characters from text fields 2025-12-05 01:03:39 +01:00
2 changed files with 5 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ plugins {
}
group = "com.chylex.intellij.keyboardmaster"
version = "0.6.5"
version = "0.6.6"
repositories {
mavenCentral()

View File

@@ -7,6 +7,7 @@ import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.actionSystem.KeyboardShortcut
import com.intellij.openapi.actionSystem.PlatformCoreDataKeys
import com.intellij.openapi.actionSystem.ex.ActionUtil
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.project.DumbAwareAction
@@ -25,6 +26,7 @@ import java.util.concurrent.atomic.AtomicBoolean
import javax.swing.Action
import javax.swing.JComponent
import javax.swing.KeyStroke
import javax.swing.text.JTextComponent
internal open class VimNavigationDispatcher<T : JComponent>(final override val component: T, private val rootNode: KeyStrokeNode.Parent<VimNavigationDispatcher<T>>, disposable: Disposable? = null) : DumbAwareAction(), ComponentHolder {
companion object {
@@ -148,7 +150,8 @@ internal open class VimNavigationDispatcher<T : JComponent>(final override val c
private fun ignoreEventDueToActiveEditing(e: AnActionEvent): Boolean {
// Avoid stealing keys from inline text fields.
return e.dataContext.getData(CommonDataKeys.EDITOR) != null
return e.getData(CommonDataKeys.EDITOR) != null
|| e.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT) is JTextComponent
}
final override fun getActionUpdateThread(): ActionUpdateThread {