Failed to handle key=%3F. Cannot read property 'start' of undefined
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:
Open Visual Studio Code, then open the folder with the big project (and big file) and close vs code.
After that, open vs code again and wait till the big file content appears. Start search and every type will be with this error.
This bug also has one interesting thing. When you type a key, you get the error, but the second type will not. And again. So, for type command "?hi" you have to type to keys 6 times.
VSCodeVim version: 1.21.5
Stack trace
TypeError: Failed to handle key=%3F. Cannot read property 'start' of undefined
at f.setCurrentMode (c:\Users\rusan\.vscode\extensions\vscodevim.vim-1.21.5\src\state\vimState.ts:277:72)
at runMicrotasks (<anonymous>)
at process.currentMode (internal/process/task_queues.js:93:5)
at k.i [as exec] (c:\Users\rusan\.vscode\extensions\vscodevim.vim-1.21.5\src\actions\commands\search.ts:265:16)
at k.execCount (c:\Users\rusan\.vscode\extensions\vscodevim.vim-1.21.5\src\actions\base.ts:198:42)
at j.actionToRecord [as runAction] (c:\Users\rusan\.vscode\extensions\vscodevim.vim-1.21.5\src\mode\modeHandler.ts:723:40)
at j.handledAsAction [as handleKeyAsAnAction] (c:\Users\rusan\.vscode\extensions\vscodevim.vim-1.21.5\src\mode\modeHandler.ts:652:43)
at j.text [as handleKeyEvent] (c:\Users\rusan\.vscode\extensions\vscodevim.vim-1.21.5\src\mode\modeHandler.ts:471:11)
at c:\Users\rusan\.vscode\extensions\vscodevim.vim-1.21.5\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 by reproducing the failure in VS Code with a large project and file, then inspect setCurrentMode in src/state/vimState.ts:277 and the search action at src/actions/commands/search.ts:265. Use the stack trace to trace how search input reaches the mode change, and verify that typing search keys no longer produces the error or requires duplicate key presses.
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
- Mostly clear
- Newbie friendliness
- 38/100