StarlaneStudios / vscode-comment-anchors

⚓A Visual Studio Code extension that adds support for comment anchors 🔭
https://marketplace.visualstudio.com/items?itemName=ExodiusStudios.comment-anchors
MIT License
205 stars 32 forks source link

Treeview badge not displaying correct number of anchors (if there are sections) #220

Open kosirm opened 6 months ago

kosirm commented 6 months ago

It's a small bug... In /src/anchorEngine.ts, line 1208:

const anchors = this.currentAnchors.length;

shoud be: const anchors = flattenAnchors(this.currentAnchors).length;

Problem occurs when there are sections in anchors, so currentAnchors is not reflecting real number of anchors in file.

Created pull request.