mirror of
https://github.com/chylex/IntelliJ-AceJump.git
synced 2024-11-25 08:42:45 +01:00
Compare commits
No commits in common. "9a14fb87e357f065f9d4d9ec3b00614b425ebef7" and "1f76a8bd25b16b662e1cae515b3fc7d729f3c3a4" have entirely different histories.
9a14fb87e3
...
1f76a8bd25
@ -8,16 +8,16 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "org.acejump"
|
group = "org.acejump"
|
||||||
version = "chylex-20"
|
version = "chylex-19"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
intellij {
|
intellij {
|
||||||
version.set("2023.3.3")
|
version.set("2023.3")
|
||||||
updateSinceUntilBuild.set(false)
|
updateSinceUntilBuild.set(false)
|
||||||
plugins.add("IdeaVIM:chylex-31")
|
plugins.add("IdeaVIM:chylex-22")
|
||||||
|
|
||||||
pluginsRepositories {
|
pluginsRepositories {
|
||||||
custom("https://intellij.chylex.com")
|
custom("https://intellij.chylex.com")
|
||||||
|
@ -10,13 +10,13 @@ import com.maddyhome.idea.vim.action.change.change.ChangeVisualAction
|
|||||||
import com.maddyhome.idea.vim.action.change.delete.DeleteVisualAction
|
import com.maddyhome.idea.vim.action.change.delete.DeleteVisualAction
|
||||||
import com.maddyhome.idea.vim.action.copy.YankVisualAction
|
import com.maddyhome.idea.vim.action.copy.YankVisualAction
|
||||||
import com.maddyhome.idea.vim.api.injector
|
import com.maddyhome.idea.vim.api.injector
|
||||||
|
import com.maddyhome.idea.vim.command.MappingMode.OP_PENDING
|
||||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||||
import com.maddyhome.idea.vim.group.visual.vimSetSelection
|
import com.maddyhome.idea.vim.group.visual.vimSetSelection
|
||||||
import com.maddyhome.idea.vim.helper.inVisualMode
|
import com.maddyhome.idea.vim.helper.inVisualMode
|
||||||
import com.maddyhome.idea.vim.helper.vimSelectionStart
|
import com.maddyhome.idea.vim.helper.vimSelectionStart
|
||||||
import com.maddyhome.idea.vim.helper.vimStateMachine
|
import com.maddyhome.idea.vim.helper.vimStateMachine
|
||||||
import com.maddyhome.idea.vim.newapi.vim
|
import com.maddyhome.idea.vim.newapi.vim
|
||||||
import com.maddyhome.idea.vim.state.mode.Mode
|
|
||||||
import com.maddyhome.idea.vim.state.mode.SelectionType
|
import com.maddyhome.idea.vim.state.mode.SelectionType
|
||||||
import org.acejump.boundaries.StandardBoundaries.AFTER_CARET
|
import org.acejump.boundaries.StandardBoundaries.AFTER_CARET
|
||||||
import org.acejump.boundaries.StandardBoundaries.BEFORE_CARET
|
import org.acejump.boundaries.StandardBoundaries.BEFORE_CARET
|
||||||
@ -52,12 +52,12 @@ sealed class AceVimAction : DumbAwareAction() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
val vim = editor.vim
|
val vim = editor.vim
|
||||||
val keyHandler = KeyHandler.getInstance()
|
|
||||||
val commandState = vim.vimStateMachine
|
val commandState = vim.vimStateMachine
|
||||||
if (commandState.isOperatorPending(vim.mode)) {
|
if (commandState.isOperatorPending) {
|
||||||
val key = keyHandler.keyHandlerState.commandBuilder.keys.singleOrNull()?.keyChar
|
val key = commandState.commandBuilder.keys.singleOrNull()?.keyChar
|
||||||
|
|
||||||
keyHandler.fullReset(vim)
|
commandState.reset()
|
||||||
|
KeyHandler.getInstance().fullReset(vim)
|
||||||
|
|
||||||
AceVimUtil.enterVisualMode(vim, SelectionType.CHARACTER_WISE)
|
AceVimUtil.enterVisualMode(vim, SelectionType.CHARACTER_WISE)
|
||||||
caret.vim.vimSetSelection(caret.offset, initialOffset, moveCaretToSelectionEnd = true)
|
caret.vim.vimSetSelection(caret.offset, initialOffset, moveCaretToSelectionEnd = true)
|
||||||
@ -72,10 +72,10 @@ sealed class AceVimAction : DumbAwareAction() {
|
|||||||
if (action != null) {
|
if (action != null) {
|
||||||
ApplicationManager.getApplication().invokeLater {
|
ApplicationManager.getApplication().invokeLater {
|
||||||
WriteAction.run<Nothing> {
|
WriteAction.run<Nothing> {
|
||||||
keyHandler.keyHandlerState.commandBuilder.pushCommandPart(action)
|
commandState.commandBuilder.pushCommandPart(action)
|
||||||
|
|
||||||
val cmd = keyHandler.keyHandlerState.commandBuilder.buildCommand()
|
val cmd = commandState.commandBuilder.buildCommand()
|
||||||
val operatorArguments = OperatorArguments(vim.mode is Mode.OP_PENDING, cmd.rawCount, commandState.mode)
|
val operatorArguments = OperatorArguments(commandState.mappingState.mappingMode == OP_PENDING, cmd.rawCount, commandState.mode)
|
||||||
|
|
||||||
commandState.executingCommand = cmd
|
commandState.executingCommand = cmd
|
||||||
injector.actionExecutor.executeVimAction(vim, action, context, operatorArguments)
|
injector.actionExecutor.executeVimAction(vim, action, context, operatorArguments)
|
||||||
|
Loading…
Reference in New Issue
Block a user