While on the subject of Call tips, I was puzzled by some code in SciTE.

In SciTEBase::CharAdded(), there is the code:

if ((selEnd == selStart) && (selStart > 0)) {
    int style = SendEditor(SCI_GETSTYLEAT, selStart - 1, 0);
        if (style != 1) { etc...

Is this an attempt to not apply autocompletion, call tips and indents in
comments?

I have implemented something similar, but I had to use ((selStart > 1) ?
selStart-2 : 0). This is because selStart-1 is indeed the character that has
just been added, but it has not yet been styled, so it always has style 0.
Styling is applied after the CharAdded notification.

Best wishes,

Greg Smith





_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to