Closed qkeitoe closed 1 year ago
From what I can see this only happens when "workbench.editor.enablePreview"
is true, so I couldn't reproduce it using my default vscode setup, and it explains why I didnt catch it before.
The exception is indeed caused by the fast opening and closing of text documents, because the document links checks take a long time due to checking if other files exist, and by the time the calls resolve the text document has already been closed, and the settings for that text document also deleted from the language server, causing the Cannot read properties of undefined.
Oh, yeah, after changing this setting to false, the error no longer occurs.
I got this error even with "workbench.editor.enablePreview"
being set to false. I'm not sure which of my actions caused the error. I'll try to spot it next time.
Edit: It seems that quickly closing a bunch of files causes this error.
Yes "workbench.editor.enablePreview"
doesn't cause the error, just makes it more likely to happen. If you rapidly close many files it will also cause the error because of the fast switching and closing.
Either way this is fixed and will be released in the next update.
I don't know what exactly triggers this error or if it causes any actual problems, but I've manager to "consistently" trigger the error by switching from file to file quickly enough:
https://github.com/cooolbros/vscode-vdf/assets/66339491/f1cae2ad-c791-4d1e-a64f-d29ac0c72104
But as far as I can tell, that's not the only scenario for this error to be triggered.