Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VIM-3238 Fix recording a macro that replays another macro #805

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

chylex
Copy link
Contributor

@chylex chylex commented Jan 24, 2024

No description provided.

@lippfi
Copy link
Contributor

lippfi commented Feb 6, 2024

Hi! Thank you for this PR
Wouldn't moving the command execution step inside the recursion fix the issue?

Index: vim-engine/src/main/kotlin/com/maddyhome/idea/vim/KeyHandler.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/KeyHandler.kt b/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/KeyHandler.kt
--- a/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/KeyHandler.kt	(revision 2a1c4b3a1c18fb3c55ef9143c706a4c1342bfd09)
+++ b/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/KeyHandler.kt	(date 1707260869735)
@@ -163,10 +163,10 @@
           }
         }
       }
+      finishedCommandPreparation(editor, context, editorState, commandBuilder, key, shouldRecord)
     } finally {
       handleKeyRecursionCount--
     }
-    finishedCommandPreparation(editor, context, editorState, commandBuilder, key, shouldRecord)
   }
 
   internal fun finishedCommandPreparation(

If it does, could you please update the PR?

@chylex
Copy link
Contributor Author

chylex commented Feb 7, 2024

Wouldn't moving the command execution step inside the recursion fix the issue?

It does, I have updated the PR but I will rebase onto master and force-push again.

@lippfi lippfi merged commit f69630b into JetBrains:master Feb 10, 2024
4 checks passed
@lippfi
Copy link
Contributor

lippfi commented Feb 10, 2024

Thank you!

@chylex chylex deleted the pr-recursive-macro branch February 10, 2024 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants