swyddfa / esbonio

A language server for working with Sphinx projects.
https://docs.esbon.io/
131 stars 21 forks source link

Scrolling editor no longer syncs with previewer after preview scroll #875

Open davbeek opened 4 weeks ago

davbeek commented 4 weeks ago

Expected behavior

When the editor scrolls, the previewer should follow (sync) the scrolling

Actual behavior

Initially, after starting VSCode, scrolling syncs both ways (as it should): scrolling the previewer scrolls the editor, and scrolling the editor scrolls the previewer.

Problem is that after I scroll the previewer (and the editor follows the scrolling) and then scroll the editor, the previewer stays put and does not follow (sync) scrolling from the editor anymore. I have observed this in two repositories and with several files.

Closing and reopening VSCode or switching to another rst file in the editor, solves the problem, but only until the first previewer scroll in that new file. So, my current workaround is: every time scrolling no longer syncs from editor to previewer, click another rst file and click back to the original file.

Esbonio 0.95.1 Sphinx 7.3.7 Python 3.12.4 macOS Sonoma 14.6.1 VSCode 1.92.2

Log output

No response

(Optional) Settings from conf.py

No response

davbeek commented 3 weeks ago

I can confirm the same behavior on Windows 10 Pro version 22H2, same versions of Esbonio, Sphinx and VSCode as on Mac.

alcarney commented 3 weeks ago

Thanks for reporting this, I've been seeing the same just haven't got around to investigating yet.

My guess is for some reason, after scrolling the preview VSCode is forgetting which editor is currently being previewed so stops sending the required scroll notifications