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
fix #5280: synchronize preview with editor when scrolls #5442
fix #5280: synchronize preview with editor when scrolls #5442
Conversation
@AlexTugarev Could you review please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thank you!
71ba5ff
to
25c9be0
Compare
@AlexTugarev I found another related issue - synchronization may break if the preview is quickly scrolled all the way up to the top. But it seems that it already exists on the current master. I think it's better to open a new issue on this. Also, the performance of finding the source code line could be improved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@a1994846931931 thanks for this PR! Very cool! It's a great improvement. 💯
getVisibleRanges
.
Also, as you pointed out correctly, the sync story needs a second revision to get rid of this nasty setTimeout-based locks/unlocks.
Signed-off-by: Cai Xuye <a1994846931931@gmail.com>
Yes, indeed |
25c9be0
to
c58e8b8
Compare
@AlexTugarev Thanks for your detailed review! Codes are updated now. |
Signed-off-by: Cai Xuye a1994846931931@gmail.com
Synchronize markdown preview with editor when scrolls on both sides.
Before:
After: