VSCodeVim / VSCodeVim/Vim

Macros goes on and on

Open
#3,365 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area/macro kind/bug
Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Describe the bug
When I simply apply a Macro on more than the number of lines in the file, the macros don't stop at the end of the file but goes on and on. eg. If the number of lines is 5 and I apply it 10 times i.e 10@@, It won't stop on the 5th line, but repeat itself 10 times on the last line of the file.

To Reproduce
Steps to reproduce the behavior:

  1. Record a macro like qq <Shift>I<p><Esc><Shift>A</p>jq
  2. Apply it on the first line @q
  3. Then again all the lines of the file 10@@
  4. See the last line

Expected behavior
It is supposed to be stopped on the 5th line.

Screenshots

vscode

  • Extension (VsCodeVim) version: 1.0.1
  • VSCode version: 1.30.2
  • OS: Linux Mint 19 Tara x86_64

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the recorded macro with 10@@ in a five-line file, then trace the macro replay path for repeated @ execution. The fix is done when replay stops at the end of the file instead of repeating on the final line, while normal macro behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.