Open donjan opened 1 year ago
Thinking some more about it, here are two additional possible workarounds:
Now switched to Retext 8.0.1, issue as described in OP persists.
In webenginepreview.py::ReTextWebEnginePreview
, only the editBox
(left side) is hooked up to events.
We can hook up the preview (right side) to events (after the variable webPage
is defined in the constructor):
webPage.scrollPositionChanged.connect(lambda value: print(value))
But as mentioned, SyncScroll
is currently not equipped to update the editor window.
Using ReText 7.2.3 on Ubuntu 22.04.
Enabled the WebKit renderer option, as well as Preferences -> Enable synchronized scrolling for Markdown. With live preview on.
Observed behaviour
Scrolling in the editor pane synchronises the live preview. Scrolling in the live preview render does not scroll synchronise the editor, which stays still.
In large documents, when something to improve is found by scrolling through the preview, finding the location in the editor is tedious. Moving the mouse to the editor pane and starting to scroll immediately loses the point of interest in the preview.
Expected behaviour
Scrolling in either pane should synchronise the other.
A less convenient but functional alternative might be a "go to current location in editor" context menu in the preview.
Additional info
Issue https://github.com/retext-project/retext/issues/108 requests "sync, no matter in which window the user scrolls" and is marked as closed, but doesn't match the expected behaviour. Issue https://github.com/retext-project/retext/issues/513 is still open but the comment history doesn't clarify directionality.
https://github.com/retext-project/retext/blob/master/ReText/syncscroll.py gives the impression that only the direction editor->preview is implemented.