From 393d2d435328253ff53d4e48066a45d91a30f9ce Mon Sep 17 00:00:00 2001
From: Alex Plate <aleksei.plate@jetbrains.com>
Date: Fri, 7 Mar 2025 16:48:32 +0200
Subject: [PATCH] Fix the issue that backspace key was not working in the code
 review comments for GitHub

The context component should be detected automatically
---
 .../java/com/maddyhome/idea/vim/helper/IjActionExecutor.kt  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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 d93972130..26b665046 100644
--- a/src/main/java/com/maddyhome/idea/vim/helper/IjActionExecutor.kt
+++ b/src/main/java/com/maddyhome/idea/vim/helper/IjActionExecutor.kt
@@ -87,7 +87,11 @@ internal class IjActionExecutor : VimActionExecutor {
     } else {
       try {
         isRunningActionFromVim = true
-        val res = ActionManager.getInstance().tryToExecute(ijAction, null, editor?.ij?.component, "IdeaVim", true)
+        // DataContext is build on the context component.
+        //   However, it should be null as in this case the data context is taken from the context and the
+        //   PlatformDataKeys.EDITOR is properly set.
+        val contextComponent: Component? = null
+        val res = ActionManager.getInstance().tryToExecute(ijAction, null, contextComponent, "IdeaVim", true)
         res.waitFor(5_000)
         return res.isDone
       } finally {