From 2643301ea9d95162f1b6f59e10cb139362274751 Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Thu, 27 Mar 2025 10:17:25 +0100 Subject: [PATCH] Actions and Enter are broken in Rider... --- .../java/com/maddyhome/idea/vim/action/VimShortcutKeyAction.kt | 3 +++ .../java/com/maddyhome/idea/vim/helper/IjActionExecutor.kt | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/maddyhome/idea/vim/action/VimShortcutKeyAction.kt b/src/main/java/com/maddyhome/idea/vim/action/VimShortcutKeyAction.kt index ea4b12ecc..42b5d8beb 100644 --- a/src/main/java/com/maddyhome/idea/vim/action/VimShortcutKeyAction.kt +++ b/src/main/java/com/maddyhome/idea/vim/action/VimShortcutKeyAction.kt @@ -182,6 +182,9 @@ class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatible*/ { } if (editor.inInsertMode) { + if (keyCode == KeyEvent.VK_ENTER) { + return ActionEnableStatus.no("Enter action in insert mode", LogLevel.INFO) + } if (keyCode == KeyEvent.VK_TAB) { // TODO: This stops VimEditorTab seeing <Tab> in insert mode and correctly scrolling the view // There are multiple actions registered for VK_TAB. The important items, in order, are this, the Live diff --git a/src/main/java/com/maddyhome/idea/vim/helper/IjActionExecutor.kt b/src/main/java/com/maddyhome/idea/vim/helper/IjActionExecutor.kt index 07375be25..8be8c852d 100644 --- a/src/main/java/com/maddyhome/idea/vim/helper/IjActionExecutor.kt +++ b/src/main/java/com/maddyhome/idea/vim/helper/IjActionExecutor.kt @@ -38,6 +38,7 @@ import com.maddyhome.idea.vim.api.VimActionExecutor import com.maddyhome.idea.vim.api.VimEditor import com.maddyhome.idea.vim.command.OperatorArguments import com.maddyhome.idea.vim.handler.EditorActionHandlerBase +import com.maddyhome.idea.vim.ide.isRider import com.maddyhome.idea.vim.newapi.IjNativeAction import com.maddyhome.idea.vim.newapi.ij import com.maddyhome.idea.vim.newapi.runFromVimKey @@ -76,7 +77,7 @@ internal class IjActionExecutor : VimActionExecutor { } val ijAction = (action as IjNativeAction).action - if (Registry.`is`("ideavim.old.action.execution", true)) { + if (Registry.`is`("ideavim.old.action.execution", true) || isRider()) { return manualActionExecution(context, ijAction) } else { try {