Failed to handle key `o`: Illegal argument: line 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.21.10
Stack trace
Error: Failed to handle key `o`: Illegal argument: line must be non-negative
at k (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:5:1232)
at new I (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:87:17825)
at new I (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:87:17220)
at Qe.execCount (/home/manas/.vscode-oss/extensions/vscodevim.vim-1.21.10/src/actions/commands/actions.ts:1572:22)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at j.actionToRecord [as runAction] (/home/manas/.vscode-oss/extensions/vscodevim.vim-1.21.10/src/mode/modeHandler.ts:713:47)
at j.handledAsAction [as handleKeyAsAnAction] (/home/manas/.vscode-oss/extensions/vscodevim.vim-1.21.10/src/mode/modeHandler.ts:662:43)
at j.text [as handleKeyEvent] (/home/manas/.vscode-oss/extensions/vscodevim.vim-1.21.10/src/mode/modeHandler.ts:477:11)
at /home/manas/.vscode-oss/extensions/vscodevim.vim-1.21.10/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 at src/actions/commands/actions.ts:1572, where the stack trace reports Qe.execCount, and trace key handling through src/mode/modeHandler.ts:713, 662, and 477. Reproduce the failure with VSCodeVim 1.21.10 and identify the state that produces a negative line. Done means key o no longer raises this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100