Page 1 of 1

FIXED: Faulty synchronized scroll

Posted: 28 Jul 2020 09:29
by pjj
(I don't think it is just beta's bug.)

I have two documents, and dual view set on. I moved one to the right view, set both documents into positions (so a certain line of the left view document was corresponding to a certain line of another document), put caret into the right view document, clicked on "Use synchronized scroll" icon and started scrolling (by a mouse wheel or vertical sliders). Sadly, the scroll momentarily got un-synchronized, namely the left document view "jumped" several lines up.

Example: left view document (939 LOC) is set in such a way that 500th line is at the top; right view document (363 LOC) is set to 1st line at the top. I click on the toolbar icon and move mouse wheel a bit; left document jumps to the 1st line.

At first I thought this bug was due to bookmarks I had in both documents; I deleted them and the scroll became synchronized! Unfortunately, only for some time. I kept messing with it and, moving mouse cursor from the left view to the right one and vice-versa I managed to synchronize them as I originally wanted (sometimes they were off by 1 line, though). That didn't last long, alas -- the best way to destroy synchronized scroll seems to be getting to the top (or bottom) of longer/shorter document and scrolling on.

Perhaps it could be solved by adding "negative gutter", so both documents could be scrolled up and down till their tops and bottoms, while the corresponding document is scrolled as well (but hidden). Say document A is at its top, but B isn't; I can scroll B upwards, while A stays fixedly; with "negative gutter" on document A, it would "scroll" upwards, reaching line with number in minus range.

...Or perhaps I don't understand how it is supposed to work at all? I just had an "aha moment": while scrolling left document at whim, right stays at its place; only scrolling right document makes left document scroll synchronistically... but no, it doesn't work this way and I can see no stable pattern.

Re: Faulty synchronized scroll

Posted: 29 Jul 2020 18:14
by Rickard Johansson
This should work in v14.60 beta 3 (and later).

Re: FIXED: Faulty synchronized scroll

Posted: 30 Jul 2020 09:11
by pjj
Thanks a lot! Now it works as expected, so I can sit and keep scratching my head, thinking why two pieces of code, that were supposed to do the same, don't :roll: Ahh, the ineffable joy of refactoring!