mb21/panwriter

In split view, editor and preview views do not scroll in sync

guillerodriguez opened this issue · 5 comments

The preview and editor views do not scroll in sync; if you scroll any of the two views, the other view will also scroll, but not at the same pace or not to the same location, which sort of defeats the purpose of the split view.

This is Panwriter 0.8.2 on macOS / M1.

Still present in 0.8.5

I'm using

  • Mac OS 13.1
  • pandoc 3.1
  • panWriter 0.8.5

the same in windows

Same issue (Windows), still present in 0.8.6. First time using the software, first launch. It also happens to be a freshly installed new PC.

For me, version 0.8.6 on Windows it is even worse, the windows are not only not synchronised, if I am in the preview window somewhere in the document and scroll in the Markdown window (no matter in which direction) the document in the preview window jumps to the top of the document.

Is there a workaround (I don't think it was always like this).

mb21 commented

Yeah, on some documents I can reproduce it. I'm pretty sure it used to work a lot better, probably broke in some Electron (i.e. Chromium) upgrade. Anyway, the code is somewhat finicky and to be frank, I've been putting this off thinking we should upgrade to CodeMirror 6 first. If anybody would like to start working on that, pull requests welcome!

Edit: I started work on a codemirror6 branch.