marp-team / marp-vscode

Marp for VS Code: Create slide deck written in Marp Markdown on VS Code
https://marketplace.visualstudio.com/items?itemName=marp-team.marp-vscode
MIT License
1.55k stars 72 forks source link

preview does not behave well with sticky scroll #419

Closed cyril-marpaud closed 1 year ago

cyril-marpaud commented 1 year ago

Version of Marp Tool

Marp for VS Code 2.6.0

Operating System

Linux

Environment

How to reproduce

  1. enable sticky scroll in VSCode settings: "editor.stickyScroll.enabled": true,
  2. open a slide deck (.md file) and its preview side by side
  3. vertical sync struggles (particularly when the source markdown spans over many lines)

Expected behavior

the preview pane stays in vertical sync with the source markdown pane (the preview "start point" should be the first non sticky line)

Actual behavior

the preview pane does not stay in vertical sync with the source markdown pane (the preview "start point" actually seems to be the first displayed line, meaning the first sticky line)

Additional information

No response

yhatt commented 1 year ago

VS Code seems to have treated sticky headers as floating contents that are not affected by scroll sync. The same problem can also be seen when Marp preview was disabled. So this is a VS Code issue, not a Marp issue.

Marp for VS Code extension cannot change VS Code's scroll sync logic, so there is nothing more we can do.

You should report this in the VS Code issue tracker instead. https://github.com/microsoft/vscode/issues