Failed to handle key=<C-a>. Unexpected Mode 1
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.6
Stack trace
Error: Failed to handle key=<C-a>. Unexpected Mode 1
at y.getCursorPosition (/home/janny/.vscode/extensions/vscodevim.vim-1.21.6/src/actions/commands/put.ts:379:13)
at y.exec (/home/janny/.vscode/extensions/vscodevim.vim-1.21.6/src/actions/commands/put.ts:62:36)
at runMicrotasks (<anonymous>)
at process.j (internal/process/task_queues.js:93:5)
at y.execCount (/home/janny/.vscode/extensions/vscodevim.vim-1.21.6/src/actions/base.ts:229:42)
at I.runAction (/home/janny/.vscode/extensions/vscodevim.vim-1.21.6/src/mode/modeHandler.ts:728:40)
at I.rerunRecordedState (/home/janny/.vscode/extensions/vscodevim.vim-1.21.6/src/mode/modeHandler.ts:1103:55)
at Object.transformer [as executeTransformations] (/home/janny/.vscode/extensions/vscodevim.vim-1.21.6/src/transformations/execute.ts:206:12)
at I.actionToRecord [as runAction] (/home/janny/.vscode/extensions/vscodevim.vim-1.21.6/src/mode/modeHandler.ts:731:55)
at I.handledAsAction [as handleKeyAsAnAction] (/home/janny/.vscode/extensions/vscodevim.vim-1.21.6/src/mode/modeHandler.ts:657:43)
at I.mh [as handleKeyEvent] (/home/janny/.vscode/extensions/vscodevim.vim-1.21.6/src/mode/modeHandler.ts:472:11)
at r (/home/janny/.vscode/extensions/vscodevim.vim-1.21.6/extensionBase.ts:501:15)
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, especially getCursorPosition and exec, then trace the call from src/actions/base.ts and src/mode/modeHandler.ts shown in the stack trace. Reproduce handling and determine why it reaches Unexpected Mode 1; done means the key is handled without this error.
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