ScintillaNET
ScintillaNET copied to clipboard
ScrollRange is (still) backwards
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.