Cannot read property 'toLowerCase' of undefined
Open
Nobody has claimed this yet.
kind/bug
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
This is related to #6465 . I received this error, but I think I entered the wrong key when in multi cursor mode. So if it's not of any use, disregard. Pressing 'c' would make the multi cursor mode go away.
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
VSCodeVim version: 1.19.2
Stack trace
TypeError: Cannot read property 'toLowerCase' of undefined
at Object.updateColor (/Users/ritchie/.vscode-oss/extensions/vscodevim.vim-1.19.2/src/statusBar.ts:116:65)
at Object.setText (/Users/ritchie/.vscode-oss/extensions/vscodevim.vim-1.19.2/src/statusBar.ts:63:12)
at Object.clear (/Users/ritchie/.vscode-oss/extensions/vscodevim.vim-1.19.2/src/statusBar.ts:102:15)
at I.handleKeyEvent (/Users/ritchie/.vscode-oss/extensions/vscodevim.vim-1.19.2/src/mode/modeHandler.ts:505:17)
at process.text (internal/process/task_queues.js:97:5)
at Object.promise (/Users/ritchie/.vscode-oss/extensions/vscodevim.vim-1.19.2/extensionBase.ts:377:73)
at Object.runTasks (/Users/ritchie/.vscode-oss/extensions/vscodevim.vim-1.19.2/src/taskQueue.ts:36:26)
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/statusBar.ts, especially updateColor at line 116, then trace the setText and clear calls shown in the stack trace. Reproduce the error while leaving multi-cursor mode with the reported key sequence; done means the mode can be exited without calling toLowerCase on an undefined value.
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