mirror of
https://github.com/chylex/IntelliJ-Keyboard-Master.git
synced 2024-11-24 16:42:46 +01:00
Compare commits
2 Commits
d711e60da8
...
f814ec04bd
Author | SHA1 | Date | |
---|---|---|---|
f814ec04bd | |||
c7229a6d8e |
@ -8,7 +8,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "com.chylex.intellij.keyboardmaster"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
@ -27,7 +27,7 @@ object VimNavigation {
|
||||
fun register() {
|
||||
val disposable = ApplicationManager.getApplication().getService(PluginDisposableService::class.java)
|
||||
|
||||
StartupUiUtil.addAwtListener(::handleEvent, AWTEvent.FOCUS_EVENT_MASK, disposable)
|
||||
StartupUiUtil.addAwtListener(AWTEvent.FOCUS_EVENT_MASK, disposable, ::handleEvent)
|
||||
UiInterceptors.registerPersistent(disposable, PopupInterceptor)
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.chylex.intellij.keyboardmaster.feature.vimNavigation
|
||||
|
||||
import com.chylex.intellij.keyboardmaster.PluginDisposableService
|
||||
import com.chylex.intellij.keyboardmaster.feature.vimNavigation.VimNavigationDispatcher.WrappedAction.ForKeyListener
|
||||
import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.actionSystem.ActionUpdateThread
|
||||
import com.intellij.openapi.actionSystem.AnAction
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
@ -26,11 +26,8 @@ import javax.swing.Action
|
||||
import javax.swing.JComponent
|
||||
import javax.swing.KeyStroke
|
||||
|
||||
internal open class VimNavigationDispatcher<T : JComponent>(final override val component: T, private val rootNode: KeyStrokeNode.Parent<VimNavigationDispatcher<T>>) : DumbAwareAction(), ComponentHolder {
|
||||
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 {
|
||||
private val DISPOSABLE
|
||||
get() = ApplicationManager.getApplication().getService(PluginDisposableService::class.java)
|
||||
|
||||
@JvmStatic
|
||||
protected val ENTER_KEY: KeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0)
|
||||
|
||||
@ -74,7 +71,7 @@ internal open class VimNavigationDispatcher<T : JComponent>(final override val c
|
||||
var isSearching = AtomicBoolean(false)
|
||||
|
||||
init {
|
||||
registerCustomShortcutSet(KeyStrokeNode.getAllShortcuts(getAllKeyStrokes()), component, DISPOSABLE)
|
||||
registerCustomShortcutSet(KeyStrokeNode.getAllShortcuts(getAllKeyStrokes()), component, disposable)
|
||||
SpeedSearchSupply.getSupply(component, true)?.addChangeListener(::handleSpeedSearchChange)
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ internal object VimListNavigation {
|
||||
}
|
||||
|
||||
@Suppress("serial")
|
||||
private class VimPopupListNavigationDispatcher(component: JList<*>, override val popup: WizardPopup) : VimNavigationDispatcher<JList<*>>(component, POPUP_LIST_ROOT_NODE) {
|
||||
private class VimPopupListNavigationDispatcher(component: JList<*>, override val popup: WizardPopup) : VimNavigationDispatcher<JList<*>>(component, POPUP_LIST_ROOT_NODE, popup.parent) {
|
||||
init {
|
||||
val speedSearch = SpeedSearchSupply.getSupply(component, true) as? SpeedSearch
|
||||
if (speedSearch != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user