1
0
mirror of https://github.com/chylex/IntelliJ-Keyboard-Master.git synced 2024-10-17 07:42:48 +02:00

Compare commits

..

No commits in common. "f814ec04bd711174445f3ae3bcd560cbecb2e6a4" and "d711e60da8ce3981a8f1530e4f157104b4686310" have entirely different histories.

4 changed files with 9 additions and 6 deletions

View File

@ -8,7 +8,7 @@ plugins {
}
group = "com.chylex.intellij.keyboardmaster"
version = "0.6.1"
version = "0.6.0"
repositories {
mavenCentral()

View File

@ -27,7 +27,7 @@ object VimNavigation {
fun register() {
val disposable = ApplicationManager.getApplication().getService(PluginDisposableService::class.java)
StartupUiUtil.addAwtListener(AWTEvent.FOCUS_EVENT_MASK, disposable, ::handleEvent)
StartupUiUtil.addAwtListener(::handleEvent, AWTEvent.FOCUS_EVENT_MASK, disposable)
UiInterceptors.registerPersistent(disposable, PopupInterceptor)
}

View File

@ -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,8 +26,11 @@ 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>>, disposable: Disposable? = null) : DumbAwareAction(), ComponentHolder {
internal open class VimNavigationDispatcher<T : JComponent>(final override val component: T, private val rootNode: KeyStrokeNode.Parent<VimNavigationDispatcher<T>>) : 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)
@ -71,7 +74,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)
}

View File

@ -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, popup.parent) {
private class VimPopupListNavigationDispatcher(component: JList<*>, override val popup: WizardPopup) : VimNavigationDispatcher<JList<*>>(component, POPUP_LIST_ROOT_NODE) {
init {
val speedSearch = SpeedSearchSupply.getSupply(component, true) as? SpeedSearch
if (speedSearch != null) {