Vim icon indicating copy to clipboard operation
Vim copied to clipboard

"TypeError: Cannot read property 'visualBlock' of null" errors

Open kenny-evitt opened this issue 10 years ago • 2 comments

Sometimes, I haven't determined exactly when, I get the Vim plugin into a state whereby I'm stuck in insert mode and can't exit back to normal mode.

In the console I get errors like this, one logged each time I try to 'escape':

TypeError: Cannot read property 'visualBlock' of null
    at exitInsertMode (/Users/kenny/Library/Application%20Support/LightTable/plugins/Vim/vim.js:4648:69)
    at doHandleBinding (/Users/kenny/@code/LightTable/builds/lighttable-0.8.0-mac/LightTable.app/Contents/Resources/app/core/node_modules/codemirror/lib/codemirror.js:3162:14)
    at eval (/Users/kenny/@code/LightTable/builds/lighttable-0.8.0-mac/LightTable.app/Contents/Resources/app/core/node_modules/codemirror/lib/codemirror.js:3205:63)
    at lookup (/Users/kenny/@code/LightTable/builds/lighttable-0.8.0-mac/LightTable.app/Contents/Resources/app/core/node_modules/codemirror/lib/codemirror.js:4909:28)
    at CodeMirror.lookupKey (/Users/kenny/@code/LightTable/builds/lighttable-0.8.0-mac/LightTable.app/Contents/Resources/app/core/node_modules/codemirror/lib/codemirror.js:4924:18)
    at handleKeyBinding (/Users/kenny/@code/LightTable/builds/lighttable-0.8.0-mac/LightTable.app/Contents/Resources/app/core/node_modules/codemirror/lib/codemirror.js:3205:17)
    at onKeyDown (/Users/kenny/@code/LightTable/builds/lighttable-0.8.0-mac/LightTable.app/Contents/Resources/app/core/node_modules/codemirror/lib/codemirror.js:3237:19)
    at HTMLTextAreaElement.eval (/Users/kenny/@code/LightTable/builds/lighttable-0.8.0-mac/LightTable.app/Contents/Resources/app/core/node_modules/codemirror/lib/codemirror.js:2146:22)

I'll add more info, like steps to reproduce, once I have them.

I believe I've encountered this on all platforms, but just now I'm running a recent source version, more recent than 0.8.0, on a Mac OS X computer.

kenny-evitt avatar Jan 13 '16 22:01 kenny-evitt

Opening and closing the (a? any?) tab seems to fix it.

kenny-evitt avatar Jan 13 '16 22:01 kenny-evitt

I was wrong – opening and closing a tab doesn't really fix it. When re-opening the tab, the Vim plugin seems to be back in normal mode but once I enter insert mode again I can't then escape back to normal mode.

kenny-evitt avatar Jan 13 '16 22:01 kenny-evitt