Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thoughts on issue: Synchronised scrolling still broken. #427

Open
xyz-worx opened this issue Jan 26, 2025 · 1 comment
Open

Thoughts on issue: Synchronised scrolling still broken. #427

xyz-worx opened this issue Jan 26, 2025 · 1 comment

Comments

@xyz-worx
Copy link

As Jamie stated in his last commit for version 1.95, synchronised
scrolling is still broken. It is addressed in issues #25, #280, #380
and #404.

Based on the commit by @lowlevel-1989, I would like to show a way to
improve the current scrolling - but without bringing back the complete
behaviour from version up to 1.87.

@lowlevel-1989 committed a version of 'RemarkableWindow.py', which improves
the preview scrolling but it is not merged to the master branch. I used this
version successfully with some limitations (see below). It is based on version
1.9, which was published someday in 2021. Unfortunately, this version is not
tagged anymore, so that one can't clone it directly from github.

Here's what I've done:

  • create an arbitrary working directory

  • git clone https://github.com/jamiemcg/Remarkable.git

  • change to the sub-directory 'Remarkable'

  • git reset --hard 7b0b3dacef270a00c28e8852a88d74f72a3544d7

  • this resets the repository to commit from March 20th, 2021, which is on version 1.9

  • change to the sub-directory 'remarkable'

  • replace the file 'RemarkableWindow.py' with the version from commit f035e3d,
    which is the fix made by @lowlevel-1989.

Here are my experiences:

  • Moving the vertical scrollbar in the editor window does still not move
    the preview window synchronously.

  • So you have to synchronise editor and preview manually as a first step.

  • If you have done this, you can edit text in the editor pane and see
    your changes in the preview pane directly --- without jumping to
    the top line as reported in the issues.

One small limitation I could see on my setup:
If I add some line at the very end of the text, the preview does not
show it, although I scrolled down to the end of the preview. Adding
some text at the end lets jump the preview some lines up.
My workaround:
Place some <br><br><br><br><br><br><br><br><br><br> on the very last
line in the editor pane. This renders to html-linefeeds in the preview
and does move up the rendered text.

From my point of view, it's a much better behavior than before, anyway.
If you like, please report your experiences here.

By the way:
The broken scrolling was caused by the move from 'WebKit1' library to
'WebKit2' (correct me if I'm wrong). I've tested some other markdown
editors with very similar behavior:

  • retext --> no synchronised scrolling
  • Geany with markdown extension --> no synchronised scrolling
  • gedit with markdown extension --> no synchronised scrolling

All what I could see is that they also rely on 'WebKit2'.

best xyz-worx

@xyz-worx
Copy link
Author

One addition to my post above:

If your system is already on WebKit2-4.1, you to change the following line
in RemarkableWindow.py:

gi.require_version('WebKit2', '4.0')
to
gi.require_version('WebKit2', '4.1')

best xyz-worx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant