Consensys / vscode-solidity-auditor

Solidity language support and visual security auditor for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=tintinweb.solidity-visual-auditor
GNU General Public License v3.0
571 stars 60 forks source link

Annotations appear on both sides of a split window #12

Closed akuanti closed 3 years ago

akuanti commented 5 years ago

When I open a Solidity file in one pane and a Javascript file in a pane next to it, I see highlights and annotations in the Javascript file for variables, etc from the Solidity file. It appears to be triggered when I edit and save the Javascript file.

Screen Shot 2019-04-08 at 12 14 01 PM

If I switch to a different file and come back, the annotations disappear.

tintinweb commented 5 years ago

Hi @akuanti,

thanks for the report. I remember seeing this at least once. It is likely a race where the active editor changes while the solidity file is being processed. I already have an idea on how to solve this. might land in one of the next versions.

cheers, tin

vnavascues commented 3 years ago

Hey, I can confirm/reproduce this bug, and I have the feeling it affects the IDE performance. Cheers and congrats for this tool.

tintinweb commented 3 years ago

Thanks for the feedback @vnavascues. I've also seen it occasionally seen it and I believe it is caused by a timing issue when accessing the active editor too late. It shouldn't affect the performance though as the intense part is parsing the source file (which is in-mem cached as well). It's not on the prio list right now unless it is super annoying :) but I may be able to rework the logic somewhat soon.

cheers