Macro from visual selection forgets last character
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
When replaying a macro from a visual selection, the macro gets replayed as if the last character of the selection was not selected.
To Reproduce
Steps to reproduce the behavior:
- Use a line with the content
lorem ipsum - Visually select
lorem - Record a macro to the register
qby pressingqqca<ESC>q.loremshould be replaced bya - Visually select
ipsum - Replay the macro by pressing
@q.ipsumshould be replaced byabut is replaced byam.
Expected behavior
A replay on the complete selection is expected. However, the last character of the selection is not considered for the selection.
Screenshots
(I hope that the description is sufficient. I will add screenshots if necessary.)
Environment (please complete the following information):
- Extension (VsCodeVim) version: 0.16.2
- VSCode version: 1.26.1
- OS: Darwin x64 17.7.0
Additional context
I use the following extension settings:
"vim.enableNeovim": true,
"vim.foldfix": true,
"vim.hlsearch": true,
"vim.leader": " ",
"vim.normalModeKeyBindingsNonRecursive": [
{ "before": [ "j" ], "after": [ "g", "j" ] },
{ "before": [ "k" ], "after": [ "g", "k" ] }
],
"vim.sneak": true,
"vim.visualstar": true,
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
No source file, test, or entry point is named. First reproduce the reported macro sequence in VSCodeVim with visual selections, then trace the visual-selection and macro-replay handling. Done means replaying the macro replaces the complete ipsum selection with a rather than leaving its final character.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100