Vim: Failed to handle key=<Esc>. Cannot read property 'stop' of undefined

Created on 23 Nov 2020  路  6Comments  路  Source: VSCodeVim/Vim

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

VSCodeVim version: 1.17.1

Stack trace

TypeError: Failed to handle key=<Esc>. Cannot read property 'stop' of undefined
    at p.get cursorStopPosition [as cursorStopPosition] (/Users/zyue/.vscode/extensions/vscodevim.vim-1.17.1/out/extension.js:9:505145)
    at F.runAction (/Users/zyue/.vscode/extensions/vscodevim.vim-1.17.1/out/extension.js:9:475433)
    at F.handleKeyAsAnAction (/Users/zyue/.vscode/extensions/vscodevim.vim-1.17.1/out/extension.js:9:474805)
    at F.handleKeyEvent (/Users/zyue/.vscode/extensions/vscodevim.vim-1.17.1/out/extension.js:9:471614)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    at Object.promise (/Users/zyue/.vscode/extensions/vscodevim.vim-1.17.1/out/extension.js:9:231560)
    at Object.runTasks (/Users/zyue/.vscode/extensions/vscodevim.vim-1.17.1/out/extension.js:9:621914)

upstreadifferent-plugin

Most helpful comment

resolved in Template String Converter v 0.3.2. thanks for bringing this to my attention @joshmu @dustinm76 @Mcluck90
can confirm this was a Template String Converter, not Vim, bug so this issue should be closed.

All 6 comments

I'm having the same issue this morning, for the first time.

Repro steps:

  1. Open a new untitled file (or any other file)
  2. Set the language mode to JavaScript, TypeScript, or any of the React variants
  3. Insert the following input
'a'
  1. Move caret to a
'a'
 ^
  1. Type x to try and delete a

Disabling the Template String Converter extension fixed this for me. Even though the error is coming from the vim extension.

@dustinm76 Rather than disabling, you can roll back 'Template String Converter' extension to 0.3.0 to temporarily resolve this error.

resolved in Template String Converter v 0.3.2. thanks for bringing this to my attention @joshmu @dustinm76 @Mcluck90
can confirm this was a Template String Converter, not Vim, bug so this issue should be closed.

FWIW -- I had to uninstall the extension and then do:

rm -rf  ~/.vscode/extensions/vscodevim.vim-1.17.1

And then reinstall via the extensions marketplace. Seems a little excessive but I don't fully understand how all the pieces fit together.

Leaving this here in case someone else has a similar problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lucastheisen picture lucastheisen  路  3Comments

ACollectionOfAtoms picture ACollectionOfAtoms  路  3Comments

waltiam picture waltiam  路  3Comments

AndersenJ picture AndersenJ  路  3Comments

WangRongda picture WangRongda  路  3Comments