The `.` (last inserted text) register gets updated with `<C-a>` instead of the actual inserted text, after using `<C-a>` in Insert mode
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
After using the <C-A> key in insert mode and then leaving insert mode, the . register gets updated with <C-A> instead of the actual text that was inserted. If I then enter insert mode again, and use <C-A> again, nothing is inserted, as the <C-A> would use the . register to insert text. Therefore, <C-A> can be used only once, which is unfortunate.
To Reproduce
- Enter insert mode, write some text.
- Leave insert mode.
- Enter insert mode again, press <C-A>, and see that your last written text is inserted.
- Leave insert mode.
- Enter insert mode again, press <C-A>, and see that nothing is inserted
Expected behavior
The second time I enter insert mode and use <C-A>, I would expect that it again inserts the text that was last inserted. This would be possible, if the . register would be updated with the actual text, and not with <C-A>
Environment:
- Extension (VsCodeVim) version: 1.18.9
- VSCode version: 1.53.1
- OS: macOS Catalina, version: 10.15.7
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 Insert mode sequence described in this issue, then trace the handling of and updates to the '.' register in the TypeScript codebase. Done means pressing after leaving and re-entering Insert mode repeatedly inserts the last inserted text rather than updating the register with the key sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100