1
0
mirror of https://github.com/chylex/IntelliJ-AceJump.git synced 2025-05-07 08:34:03 +02:00

Update for IDEA 2024.1 & latest IdeaVim

This commit is contained in:
chylex 2024-07-15 13:29:26 +02:00
parent 9a14fb87e3
commit 6e08d56cdf
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548
2 changed files with 9 additions and 10 deletions
build.gradle.kts
src/main/kotlin/org/acejump/action

View File

@ -4,7 +4,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.9.10"
id("org.jetbrains.intellij") version "1.16.1"
id("org.jetbrains.intellij") version "1.17.3"
}
group = "org.acejump"
@ -15,9 +15,9 @@ repositories {
}
intellij {
version.set("2023.3.3")
version.set("2024.1.4")
updateSinceUntilBuild.set(false)
plugins.add("IdeaVIM:chylex-31")
plugins.add("IdeaVIM:chylex-37")
pluginsRepositories {
custom("https://intellij.chylex.com")
@ -33,7 +33,7 @@ dependencies {
}
tasks.patchPluginXml {
sinceBuild.set("233")
sinceBuild.set("241")
}
tasks.buildSearchableOptions {

View File

@ -14,7 +14,6 @@ import com.maddyhome.idea.vim.command.OperatorArguments
import com.maddyhome.idea.vim.group.visual.vimSetSelection
import com.maddyhome.idea.vim.helper.inVisualMode
import com.maddyhome.idea.vim.helper.vimSelectionStart
import com.maddyhome.idea.vim.helper.vimStateMachine
import com.maddyhome.idea.vim.newapi.vim
import com.maddyhome.idea.vim.state.mode.Mode
import com.maddyhome.idea.vim.state.mode.SelectionType
@ -53,8 +52,7 @@ sealed class AceVimAction : DumbAwareAction() {
else {
val vim = editor.vim
val keyHandler = KeyHandler.getInstance()
val commandState = vim.vimStateMachine
if (commandState.isOperatorPending(vim.mode)) {
if (keyHandler.isOperatorPending(vim.mode, keyHandler.keyHandlerState)) {
val key = keyHandler.keyHandlerState.commandBuilder.keys.singleOrNull()?.keyChar
keyHandler.fullReset(vim)
@ -75,12 +73,13 @@ sealed class AceVimAction : DumbAwareAction() {
keyHandler.keyHandlerState.commandBuilder.pushCommandPart(action)
val cmd = keyHandler.keyHandlerState.commandBuilder.buildCommand()
val operatorArguments = OperatorArguments(vim.mode is Mode.OP_PENDING, cmd.rawCount, commandState.mode)
val operatorArguments = OperatorArguments(vim.mode is Mode.OP_PENDING, cmd.rawCount, injector.vimState.mode)
commandState.executingCommand = cmd
injector.vimState.executingCommand = cmd
injector.actionExecutor.executeVimAction(vim, action, context, operatorArguments)
// TODO does not update status
}
keyHandler.reset(vim)
}
}
}