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

Macro duplicating inputs when recorded on multiple lines #9338

Open
Brian-Alumbaugh opened this issue Oct 30, 2024 · 0 comments
Open

Macro duplicating inputs when recorded on multiple lines #9338

Brian-Alumbaugh opened this issue Oct 30, 2024 · 0 comments

Comments

@Brian-Alumbaugh
Copy link

Describe the bug
A macro that inserts characters across multiple lines inserts a different number of characters depending on how many lines it affected when the macro was recorded.

To Reproduce
I made the following macro

$<C-v>%I//<Esc>0

Which when run while on the same line as a function declaration as seen below

image

Should comment out the entire function. Which it does when the command is run manually.

image

When the macro is executed, it will insert extra characters as seen below

image

I have confirmed that this macro runs as expected when used in a fresh NeoVim install, but will not work in VSCodeVim even with the NeoVim setting enabled.

The number of characters inserted by the macro is dependent on how many lines were involved in it's recording. So if the function you record the macro with is longer then it will insert more characters when rerun and if it's shorter then it will insert less. If the function is one line (as seen below) when the macro is recorded then the macro will work as expected and only insert one set of characters.

image

image

Expected behavior
You would expect the macro to insert one set of // no matter how many lines the macro covers when it is recorded.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.28.1
  • VSCode version: 1.94
  • OS: Windows
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

No branches or pull requests

1 participant