mjbvz / vscode-markdown-mermaid

Adds Mermaid diagram and flowchart support to VS Code's builtin markdown preview
https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid
MIT License
656 stars 120 forks source link

Auto scrolling on larger files causing chaos #255

Closed WarpedLogik closed 3 months ago

WarpedLogik commented 5 months ago

Hi, have started using your addon and think it's great however I'm trying to work on a larger sequence diagram ~120 lines and the way the auto scrolling is handled is making it pretty much unusable.

If remaining at the top of the file it's fine, both sides line up.

If I start scrolling the .md file the preview jumps to blank space at the bottom of the diagram and doesn't return unless I either scroll the diagram or scroll back to the top of the .md file.

Having to scroll back up the preview to see the bit I'm working on is slow but usable but if I want to work on the bottom part of the .md file the act of scrolling the preview back to the point where I can see the part of the diagram I need forces the .md file to scroll back to the top. This ends up as a dance between either being able to see the part of the .md file I'm working on or the part of the diagram I'm working on.

Hopefully this explanation helps, if you need any more info please shout, Cheers

mjbvz commented 5 months ago

Please share an example file which causes this

mjbvz commented 3 months ago

Closing as not actionable without steps to reproduce

giulianob commented 3 months ago

@mjbvz I am experiencing this too.

  1. Create a large diagram ( sample.md )
  2. Action >Markdown: Open preview to the side
  3. Scroll the markdown side and you can see the diagram scrolling position jumps either to the beginning/end

https://github.com/mjbvz/vscode-markdown-mermaid/assets/92303/acf6710e-2729-48bf-8c2b-7077a217e1d4

@WarpedLogik You can work around this for now by setting "markdown.preview.scrollPreviewWithEditor": false