Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.65.2 (system setup) and 1.66.0-insider
- OS Version: Windows 10 Pro 19044.1586
While writing javascript, intellisense and syntax highlighting seemingly kept freezing up or displaying incorrectly, which I found quite odd. It would go back to normal if I closed and reopened the file, but would happen again later.
Following that, I realized it happens whenever I edited a jsdoc comment in a specific way, and recorded gifs: Stable and Insiders, with extensions disabled and no extensions installed, respectively.
Though the above gifs were recorded on real code, with some minor trimming out code I've produced this gist which replicates it in the same manner as the gifs.
It seems to be caused by the @this {ListenerBlock}
tag on line 11 in the gist, as it stops happening when that line isn't present. I also tried @this ListenerBlock
in the same spot, which causes it to happen as well.
I don't know whether or not if it's valid jsdoc to use the @this
tag in this way to document a function's this value, but it seems reasonable reading it's documentation. Though I now suspect this is invalid syntax, I've still reported the issue as I would personally expect invalid syntax inside comments to be disregarded/ignored, rather than cause problems.
Steps to Reproduce:
- Open the file from the above gist, hover things to ensure intellisense is working
- Backspace the line break on line 16 and enter new lines from line 15, as seen in the gifs
- Intellisense is now either shifted over in a weird way, or doesn't display at all. Syntax highlighting has stopped working properly and appears to be shifted over, doesn't update when editing code.
- Closing and reopening the file will cause it to return to normal, but it can be repeated.
- Removing line 11 containing the
@this {ListenerBlock}
jsdoc tag causes it to stop happening. - Adding
@this ListenerBlock
back to the jsdoc comment documenting the callback also causes the syntax highlighting and intellisense to stop working properly.