1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-08-10 15:40:37 +02:00

Use the correct action for next variable

This commit is contained in:
Alex Plate 2019-10-25 14:33:52 +03:00
parent 5584b5ec3a
commit 9a2accc74b
No known key found for this signature in database
GPG Key ID: 0B97153C8FFEC09F

View File

@ -20,8 +20,10 @@ package com.maddyhome.idea.vim.action.motion.updown
import com.intellij.codeInsight.template.impl.TemplateManagerImpl
import com.intellij.openapi.actionSystem.DataContext
import com.intellij.openapi.actionSystem.IdeActions
import com.intellij.openapi.editor.Caret
import com.intellij.openapi.editor.Editor
import com.maddyhome.idea.vim.KeyHandler
import com.maddyhome.idea.vim.VimPlugin
import com.maddyhome.idea.vim.command.Argument
import com.maddyhome.idea.vim.command.CommandFlags
@ -67,7 +69,7 @@ class EnterNormalAction : MotionActionHandler.ForEachCaret() {
argument: Argument?): Int {
val templateState = TemplateManagerImpl.getTemplateState(editor)
return if (templateState != null) {
templateState.gotoEnd(false)
KeyHandler.executeAction(IdeActions.ACTION_EDITOR_NEXT_TEMPLATE_VARIABLE, context)
-1
} else {
VimPlugin.getMotion().moveCaretToLineStartSkipLeadingOffset(editor, caret, count)