Yanking selection in visual block mode does not update `0` register
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
In Vim, when you yank text, it updates the 0 (zero) register with the text you've yanked. In VSCodeVim, this behavior is broken for text selected in visual block mode (Ctrl+V); the 0 register is not updated.
To Reproduce
Steps to reproduce the behavior:
- Enter the text
abc defin your editor, and move the cursor to theaand pressEscto enter "normal" mode. - Type
ywto yank the textabcusing thewmovement. - Type
w⎈vlly, where⎈vrepresentsCtrl+V, to move to the textdef, select it in visual block mode, and yank it. - Type
o⎈r0, where⎈rrepresentsCtrl+r, to open a new line and paste the contents of the0register.
Expected behavior
The text def is pasted, which is what happens in Vim.
Actual behavior
The text abc is pasted.
Environment (please complete the following information):
- Extension Name:
vim - Extension Version:
1.18.5 - OS Version:
Darwin x64 19.6.0 - VSCode version:
1.52.1
{
"messages": [],
"activationTimes": {
"codeLoadingTime": 39,
"activateCallTime": 0,
"activateResolvedTime": 0,
"activationReason": {
"startup": true,
"extensionId": {
"value": "vscodevim.vim",
"_lower": "vscodevim.vim"
},
"activationEvent": "*"
}
},
"runtimeErrors": []
}
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
Reproduce the Ctrl+V visual-block yank sequence in VSCodeVim and trace how yanks update the 0 register. Add coverage for the stated yw followed by visual-block y sequence, then verify that opening a line and pasting register 0 produces def rather than abc.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100