Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ok this isn't quite complete, but here's my initial stab at implementing chained scrollbars - for #4.
So the way I've currently bashed it is as suggested in that issue - use the markdown parser to attribute source lines to elements in the output.
Then, when you scroll, down, it'll look and see how far down you've scrolled down as a %age of viewport height, find what element's at that position in the view, and try and align the corresponding input line / output element to the same Y position.
Kinda hard to explain. Currently I've left some helper elements in for the time being to see what's going on. Basically whatever's under the red line in each view should correspond. The line moves so that when you're at the very top, both views are scrolled to the top, and when you're at the very end, both views are at the end.
If anyone has any thoughts on this then do let me know, otherwise I'll just keep experimenting to see if I can make this as smooth as possible (and also have a way of disabling it, as suggested in the issue) because it definitely won't be able to get everything right.