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

Synchronize scroll in webdiff view #260

Open
algomaster99 opened this issue Jan 11, 2022 · 2 comments
Open

Synchronize scroll in webdiff view #260

algomaster99 opened this issue Jan 11, 2022 · 2 comments

Comments

@algomaster99
Copy link
Contributor

I think it would be nice if scrolling either of the editors in monaco-diff view scrolled the other one by the same amount. For example, one can see how it is done in the monaco-native-diff view. There could be an API in Monaco for this or we can also write a custom script using JS for it.

@jrfaller jrfaller self-assigned this Jan 11, 2022
@jrfaller
Copy link
Member

Hi and thanks for the feedback!

Indeed it would be nice to have something to facilitate scrolling. However since I do not align files by putting white spaces for insertions / deletions, it would quickly be out of sync therefore we would need something something like a hotkey to activate parallel scrolling.

Not sure however what is the best way to do it.

@algomaster99
Copy link
Contributor Author

I found a lot of resources online when I looked for "JS synchronous vertical scrolling". One of them is https://stackoverflow.com/questions/30720926/how-do-i-make-two-divs-scroll-proportionally. I can have a look at this sometime and I shall keep you posted about what we can try.

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

No branches or pull requests

2 participants