ScintillaNET icon indicating copy to clipboard operation
ScintillaNET copied to clipboard

ScrollRange is (still) backwards

Open vivainio opened this issue 6 years ago • 0 comments

There is a closed bug #213, I'm opening a new one as it still seems to be happening.

I have this code that works:

        public static void RevealLine(Scintilla scintilla, int line)
        {
            var linesOnScreen = scintilla.LinesOnScreen - 2;
            var start = scintilla.Lines[line - (linesOnScreen / 2)].Position;
            var end = scintilla.Lines[line + (linesOnScreen / 2)].Position;
            scintilla.ScrollRange(end, start);
        }

If I reverse the ScrollToRange arguments:

            scintilla.ScrollRange(start, end);

it doesn't work (doesn't scroll to right position). I'm using version 3.6.3 from nuget.

vivainio avatar Nov 16 '18 19:11 vivainio