Too many spaces (around 20) after line containing string interpolation will cause editor to crash
See original GitHub issueI’m submitting a bug report
- Extension Version: 1.0.1
Please tell us about your environment:
-
Operating System: OSX 10.x|Windows 7 (I have confirmed on both)
-
Visual studio code version: 1.20.1
HTML/JS/TS of incorrect highlight note: I have render whitespace set to ‘all’ in this screenshot.
Current behavior: Not an incorrect highlight so much as each additional space after about ~20 will cause cpu usage to spike. Simply holding down space bar should be enough to trigger a hard lock of the application
Expected/desired behavior: Code to not crash when there’s too much whitespace after a line featuring string interpolation
- What is the motivation / use case for changing the behavior? It’s annoying to have the editor crash when I backspace at the start of an empty line to remove it, only to have the whitespace append to the previous line, and cause the editor to crash.
Update:
The spaces do not have to be contiguous, so this bug would also hit anyone who has ~20 words after an aurelia interpolation, and on the same line.
${a} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
is fine
${a} a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
will crash
${a} ............................................................... (spaces)
will crash.
Possibly some error in tokenisation there somewhere.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:13 (6 by maintainers)
Top GitHub Comments
Was a bit overloaded with work this week, will look at it this weekend
Tested and implemented the fix, @darthInvad0r thanks for the helping out fixing the issue!
Will release a new version in a bit.