Failed to handle key `2`: Cannot read properties of undefined (reading 'uri')
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.24.1
Stack trace
TypeError: Failed to handle key `2`: Cannot read properties of undefined (reading 'uri')
at u.execute (c:\Users\Acer\.vscode\extensions\vscodevim.vim-1.24.1\src\cmd_line\commands\tab.ts:159:52)
at p.handleRemapping (c:\Users\Acer\.vscode\extensions\vscodevim.vim-1.24.1\src\configuration\remapper.ts:512:44)
at p.sendKey (c:\Users\Acer\.vscode\extensions\vscodevim.vim-1.24.1\src\configuration\remapper.ts:369:20)
at t.Remappers.sendKey (c:\Users\Acer\.vscode\extensions\vscodevim.vim-1.24.1\src\configuration\remapper.ts:39:26)
at process.handledAsRemap (node:internal/process/task_queues:96:5)
at N.text [as handleKeyEvent] (c:\Users\Acer\.vscode\extensions\vscodevim.vim-1.24.1\src\mode\modeHandler.ts:486:9)
at c:\Users\Acer\.vscode\extensions\vscodevim.vim-1.24.1\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 at src/cmd_line/commands/tab.ts:159, where the stack trace reports the undefined uri access, then trace how key 2 reaches it through src/configuration/remapper.ts and src/mode/modeHandler.ts. Reproduce the failure in VSCodeVim 1.24.1 and confirm that handling key 2 no longer raises this TypeError.
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
- 25/100