1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-04-24 16:15:46 +02:00

Respect count with <Action> mappings

This commit is contained in:
chylex 2023-11-17 07:32:27 +01:00
parent 7ac743c604
commit b358e63444
Signed by: chylex
SSH Key Fingerprint: SHA256:WqM8X/1DDn11LbYM0H5wsqZUjbcKxVsic37L+ERcF4o

View File

@ -260,7 +260,11 @@ class ToActionMappingInfo(
override fun execute(editor: VimEditor, context: ExecutionContext, keyState: KeyHandlerState) {
LOG.debug("Executing 'ToAction' mapping...")
injector.actionExecutor.executeAction(editor, name = action, context = context)
val commandBuilder = KeyHandler.getInstance().keyHandlerState.commandBuilder
for (i in 0 until commandBuilder.calculateCount0Snapshot().coerceAtLeast(1)) {
injector.actionExecutor.executeAction(editor, name = action, context = context)
}
commandBuilder.resetCount()
}
companion object {