Failed to handle key=p. Invalid string length
Open
Nobody has claimed this yet.
kind/bug
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
VSCodeVim version: 1.21.7
Stack trace
RangeError: Failed to handle key=p. Invalid string length
at String.repeat (<anonymous>)
at y.getRegisterText (/home/bvgo/.vscode/extensions/vscodevim.vim-1.21.7/src/actions/commands/put.ts:125:25)
at y.exec (/home/bvgo/.vscode/extensions/vscodevim.vim-1.21.7/src/actions/commands/put.ts:43:21)
at runMicrotasks (<anonymous>)
at process.j (internal/process/task_queues.js:93:5)
at y.execCount (/home/bvgo/.vscode/extensions/vscodevim.vim-1.21.7/src/actions/base.ts:231:42)
at I.actionToRecord [as runAction] (/home/bvgo/.vscode/extensions/vscodevim.vim-1.21.7/src/mode/modeHandler.ts:713:47)
at I.handledAsAction [as handleKeyAsAnAction] (/home/bvgo/.vscode/extensions/vscodevim.vim-1.21.7/src/mode/modeHandler.ts:662:43)
at I.text [as handleKeyEvent] (/home/bvgo/.vscode/extensions/vscodevim.vim-1.21.7/src/mode/modeHandler.ts:477:11)
at /home/bvgo/.vscode/extensions/vscodevim.vim-1.21.7/extensionBase.ts:370:73
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 in src/actions/commands/put.ts at getRegisterText, line 125, then follow the put command from exec at line 43. Reproduce the p key failure using the reported VSCodeVim 1.21.7 context and inspect why String.repeat receives an invalid length. Done means the p command no longer raises this RangeError for the reported case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100