Cannot read properties of undefined (reading 'lineAt')
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.18
Stack trace
TypeError: Cannot read properties of undefined (reading 'lineAt')
at ia.isLineEnd (c:\Users\Kotresh\.vscode\extensions\vscodevim.vim-1.32.2\out\extension.js:2:790276)
at D.handleSelectionChange (c:\Users\Kotresh\.vscode\extensions\vscodevim-sneak-fork.vscodevim-sneak-fork-1.21.18\src\mode\modeHandler.ts:265:55)
at job (c:\Users\Kotresh\.vscode\extensions\vscodevim-sneak-fork.vscodevim-sneak-fork-1.21.18\extensionBase.ts:335:38)
at o.start (c:\Users\Kotresh\.vscode\extensions\vscodevim-sneak-fork.vscodevim-sneak-fork-1.21.18\node_modules\queue\index.js:145:17)
at o.push (c:\Users\Kotresh\.vscode\extensions\vscodevim-sneak-fork.vscodevim-sneak-fork-1.21.18\node_modules\queue\index.js:59:12)
at Object.enqueueTask (c:\Users\Kotresh\.vscode\extensions\vscodevim-sneak-fork.vscodevim-sneak-fork-1.21.18\src\taskQueue.ts:55:20)
at listener (c:\Users\Kotresh\.vscode\extensions\vscodevim-sneak-fork.vscodevim-sneak-fork-1.21.18\extensionBase.ts:335:17)
at c:\Users\Kotresh\.vscode\extensions\vscodevim-sneak-fork.vscodevim-sneak-fork-1.21.18\extensionBase.ts:633:5
at Wd.value (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:210:99056)
at I.C (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2373)
at I.D (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2443)
at I.fire (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2660)
at QQ.$acceptEditorPropertiesChanged (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:210:64965)
at JS.S (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:124594)
at JS.Q (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:124374)
at JS.M (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:123463)
at JS.L (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:122568)
at Wd.value (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:121365)
at I.C (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2373)
at I.fire (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2591)
at Ho.fire (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:9454)
at Wd.value (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:402:8617)
at I.C (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2373)
at I.fire (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2591)
at Ho.fire (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:9454)
at MessagePortMain.<anonymous> (file:///c:/Users/Kotresh/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:402:6909)
at MessagePortMain.emit (node:events:519:28)
at Object.MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2949)
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 with src/mode/modeHandler.ts at handleSelectionChange, line 265, and compare it with the isLineEnd call shown in the stack trace. The reproduction steps are placeholders, so first identify a reliable action that triggers the error. Done means the reported undefined lineAt exception no longer occurs for that case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100