Komodo bug http://bugs.activestate.com/show_bug.cgi?id=98866
which we keep trying to fix with setTimeouts -- here's what's
When the user jumps to another <line, col=""> in another file, we essentially
make these calls:
SCI_GOTOLINE(lineNo - 1)
It turns out that on Windows we need to put the call to
SCROLLCARET in a setTimeout, or, even better, delay it
until scintilla does a NotifyUpdateUI (most likely called
from Editor::IdleWork()). Otherwise, you have to press an
arrow key to get the editor to move near currentPos (or the
selection). Otherwise, the scrollY of the buffer is random.
I believe this is new with version 3.3.3 -- our previous version was
3.2.4, which didn't have this problem.
I suspect this is due to some kind of optimization. When trying to
load buffers I noticed that sometimes the first call to GetTextRectangle
in Editor::XYScrollToMakeVisible (what SCI_SCROLLCARET invokes) sometimes
returned an invalid rectangle, usually a 0 x 0 rectangle. After the
setTimeout, it had non-zero dimensions.
Is this a bug in Scintilla, or deliberate behavior? It happens only
on Windows, not OSX or Linux.