From 3d1b502cd044899a835033e0f92f5538b574ad29 Mon Sep 17 00:00:00 2001
From: Alex Plate <aleksei.plate@jetbrains.com>
Date: Tue, 4 Mar 2025 17:31:43 +0200
Subject: [PATCH] Wait for the action to be finished before returning the
 result

---
 src/main/java/com/maddyhome/idea/vim/helper/IjActionExecutor.kt | 1 +
 1 file changed, 1 insertion(+)

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 44d3cd614..d93972130 100644
--- a/src/main/java/com/maddyhome/idea/vim/helper/IjActionExecutor.kt
+++ b/src/main/java/com/maddyhome/idea/vim/helper/IjActionExecutor.kt
@@ -88,6 +88,7 @@ internal class IjActionExecutor : VimActionExecutor {
       try {
         isRunningActionFromVim = true
         val res = ActionManager.getInstance().tryToExecute(ijAction, null, editor?.ij?.component, "IdeaVim", true)
+        res.waitFor(5_000)
         return res.isDone
       } finally {
         isRunningActionFromVim = false