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
212 stars 33 forks source link

LINKS and ANCHORs on the same page causes page to scroll up #121

Closed JoJoAtkinson closed 3 years ago

JoJoAtkinson commented 3 years ago

If I have a

line 10: # LINK ./scope.py#wildcards

followed by

line 900: # ANCHOR[id=wildcards]

on the same page, when I add a comment like

# xxxxxxx

Each 'x' will cause the page to to scroll up one line. If I kept putting 'x's my comment will scroll up and out of view.

This bug only appear if the #LINK is out of view of the ANCHOR.

JordanDi123 commented 3 years ago

Hello,

I tried reproducing this on v1.9.3 after fixing #120 but I was unable to reproduce. Could you provide further information and confirm this is still a bug? If not, please close the issue.

Thank you!

JoJoAtkinson commented 3 years ago

I think I was describing the "Document sliding up when comment with link behaviour is present in it" in the issue 109, which was resolved int he last patch. "https://github.com/ExodiusStudios/vscode-comment-anchors/issues/109"

I could not reproduce with the latest, closing with comment.

JoJoAtkinson commented 3 years ago

@JordanDi123 With the latest version (v1.9.4), I continue to observe the bug.

A few important notes is that the document must have enough content. The python file I had open had 600 lines. It only occurs if there is a code lens on a tag that is above your current view, out of sight, and you are scrolled below the tag, E.I, you must scroll up to see the tag once again.

Steps to reproduce

  1. have a code file with several pages of scrolling available.
  2. add a tag that creates the code lens above it
  3. scroll below it so that it is out of sight
  4. type letters

these are the current extensions I'm using, all latest (not including your extension) "vscode-icons-team.vscode-icons", "gruntfuggly.todo-tree", "hbenl.vscode-test-explorer", "clarkyu.vscode-sql-beautify", "adrianwilczynski.terminal-commands", "ptweir.python-string-sql", "littlefoxteam.vscode-python-test-adapter", "njpwerner.autodocstring", "ms-python.python", "ms-python.vscode-pylance", "codezombiech.gitignore", "donjayamanne.githistory", "mhutchie.git-graph", "jbockle.jbockle-format-files"

macjuul commented 3 years ago

@JoeyAtkinson We just released version 1.9.5 which has replaced the CodeLens implementation with inline document links. Could you confirm whether the issue has been resolved in this latest version?

JoJoAtkinson commented 3 years ago

Woot! @macjuul, "Replace link anchor CodeLens with clickable link" completely resolves the issue -- also, I personally prefer it over the CodeLens as I sometimes have muti-lined comments where I want to anchor or link, but don't want a awkward space.

Thank you for resolving this issue, and improving the experience! 🎉🎉🎉

macjuul commented 3 years ago

Great to hear it's working!