Failed to handle key `p`: Illegal argument: character must be non-negative
Open
Nobody has claimed this yet.
- 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.23.2
Stack trace
Error: Failed to handle key `p`: Illegal argument: character must be non-negative
at k (/snap/code/108/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:7:1279)
at new g (/snap/code/108/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:78:87309)
at new g (/snap/code/108/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:78:86640)
at W.with (/snap/code/108/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:78:89106)
at y.getCursorPosition (/home/luizbastos/.vscode/extensions/vscodevim.vim-1.23.2/src/actions/commands/put.ts:382:27)
at y.exec (/home/luizbastos/.vscode/extensions/vscodevim.vim-1.23.2/src/actions/commands/put.ts:62:36)
at process.j (node:internal/process/task_queues:96:5)
at y.execCount (/home/luizbastos/.vscode/extensions/vscodevim.vim-1.23.2/src/actions/base.ts:215:42)
at N.actionToRecord [as runAction] (/home/luizbastos/.vscode/extensions/vscodevim.vim-1.23.2/src/mode/modeHandler.ts:740:47)
at N.handledAsAction [as handleKeyAsAnAction] (/home/luizbastos/.vscode/extensions/vscodevim.vim-1.23.2/src/mode/modeHandler.ts:689:43)
at N.text [as handleKeyEvent] (/home/luizbastos/.vscode/extensions/vscodevim.vim-1.23.2/src/mode/modeHandler.ts:506:11)
at /home/luizbastos/.vscode/extensions/vscodevim.vim-1.23.2/extensionBase.ts:359: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 getCursorPosition around line 382, then trace the p command execution shown in the stack trace. Reproduce the reported error and identify the cursor-position input that violates the non-negative character requirement; done means p no longer throws this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100