Different behavior recording vs executing macros
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Is this a BUG REPORT or FEATURE REQUEST? : Bug
What happened:
When recording macros, the behavior of the command w is different during recording than it is during execution. For instance, if you have a string and want to jump to the beginning of the word, during recording you have to press w twice to jump to the ' and then the beginning of the word. However, during execution the first time w fires the cursor goes straight to the beginning of the word, so the second recorded w will move the cursor to the next word and throw the entire sequence out of position.
How to reproduce it:
start with [ 'string', ] and cursor at the beginning
qaw(cursor moves to')w(cursor moves tos)yw w l l pq
during recording that yields ['string', string], but when you call it with @a it yields [ 'ststringring', ]
I think the problem is the ' character. When the example above executes, the w commands in steps 2 and 4 don't jump the cursor to ' like they do during recording.
Environment:
- Extension (VsCodeVim) version: 0.11.5
- VSCode version: 1.22.2
- OS version: OSX 10.11.6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported macro sequence in VSCodeVim 0.11.5 on the shown input, comparing recording and execution of the w motions around the apostrophe. Trace the macro recording and replay entry points to identify why motion behavior differs; done means the recorded sequence produces the same result during replay.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100