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:
parent
5584b5ec3a
commit
9a2accc74b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user