Smooth scrolling to a distant diff

Issue #161 resolved
Serhan Apaydın
created an issue


Hi all,

I'm trying to implement a smooth-scrolling animation that's supposed to happen when I jump from a diff to another one that's not visible in the editor at that moment (a distant diff, I mean).

This is what I came up with:


Using the following changes:

The obvious problem here is that the two panes do not scroll simultaneously because async programming is one of the many things I suck at C++.

Here I've tried calling pCurrentView->ScrollToSubLine(nLine); and pOtherView->ScrollToSubLine(nLine); in separate threads to make them run simaltaneously, which kinda worked, but led to problems related to incorrect positioning of the caret so I gave up.

Any guidance, advice, etc. would be greatly appreciated.

Comments (3)

  1. jtuc repo owner

    Thanks for sharing your inspiring work. Changeset c30165eb8725 takes a somewhat same but different approach. It doesn't scroll the whole distance, but just a few lines from the starting point, to create a fancy looking effect without slowing down the whole thing too much. It also addresses the simultaneousness issue.

  2. Log in to comment