tektronix / tsp-toolkit

VSCode extension for Keithley Instruments' Test Script Processor
Apache License 2.0
5 stars 1 forks source link

[Bug]: Comment color coding doesn't reset if there's only 1 comment #15

Closed Little-LIZard closed 5 months ago

Little-LIZard commented 5 months ago

Pre-check

Search Terms

comment, color

TSP Toolkit Version

0.15.0

TSP Toolkit Develop Version

0.15.0

Steps to Reproduce

Basically, if there's only a single comment in a TSP script and you remove it, the text color doesn't update, you need multiple comments to get that to work. To reproduce, in a TSP Script

  1. write a single comment i.e. -- foo This will color code to green as it's a comment.
  2. delete the dashes, basically removing the status as comment. foo will not change from green.
  3. Add another comment on line 2 i.e. --bar. As soon as you type the dashes for the comment, the color coding for foo changes back.
  4. Add another comment on line 3 so now you have foo --bar --baz uncomment line 2. Bar changes to normal text color because you still have another comment (--baz) in the script.

Expected Behavior

When you remove the dashes so that a line is no longer commented out, the color coding should update, even when there's no other comments in the script.

Actual Behavior

If there's only one comment, the coloring doesn't update.

esarver commented 5 months ago

@Little-LIZard What version of VSCode are you using? Does the issue occur consistently?

Little-LIZard commented 5 months ago

@esarver VS Code version 1.88.1. Seems pretty consistent on my end, I'm able to create new TSP files and see the issue and it happens any time there's only one comment in the file.

esarver commented 5 months ago

Interesting, I was not able to reproduce on locally with the given steps. If you save the file, does the highlighting get corrected?

esarver commented 5 months ago

After talking more with @Little-LIZard a little more, we are unable to determine why this would be happening. Even after save the highlighting is still incorrect. Closing for now as "not reproducible" If anyone else sees this issue, please submit a new issue and we can work with LuaLS to try to resolve the issue.