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.22.2
Stack trace
Error: Failed to handle key `p`: Illegal argument: character must be non-negative
at D (c:\Users\mehme\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:5:1247)
at new _ (c:\Users\mehme\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:76:91053)
at new _ (c:\Users\mehme\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:76:90384)
at x.with (c:\Users\mehme\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:76:92848)
at y.getCursorPosition (c:\Users\mehme\.vscode\extensions\vscodevim.vim-1.22.2\src\actions\commands\put.ts:376:27)
at y.exec (c:\Users\mehme\.vscode\extensions\vscodevim.vim-1.22.2\src\actions\commands\put.ts:62:36)
at runMicrotasks (<anonymous>)
at process.j (internal/process/task_queues.js:93:5)
at y.execCount (c:\Users\mehme\.vscode\extensions\vscodevim.vim-1.22.2\src\actions\base.ts:229:42)
at j.actionToRecord [as runAction] (c:\Users\mehme\.vscode\extensions\vscodevim.vim-1.22.2\src\mode\modeHandler.ts:714:47)
at j.handledAsAction [as handleKeyAsAnAction] (c:\Users\mehme\.vscode\extensions\vscodevim.vim-1.22.2\src\mode\modeHandler.ts:663:43)
at j.text [as handleKeyEvent] (c:\Users\mehme\.vscode\extensions\vscodevim.vim-1.22.2\src\mode\modeHandler.ts:478:11)
at c:\Users\mehme\.vscode\extensions\vscodevim.vim-1.22.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 with src/actions/commands/put.ts, especially getCursorPosition and exec, which appear in the stack trace for handling key p. Reproduce the error in VSCodeVim 1.22.2 and trace the cursor position passed to the VS Code API. Done means pressing p no longer raises the non-negative-character exception.
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