Hum, if I understand well what you say, you're doing wrong: you're explicitly telling you use INDICS_MASK (which means overwrite ALL indicators), then you set only the one you want with SCI_SETSTYLING... so each time you put stuff for one of them you loose previously set indicators.Neil Hodgson wrote:
Robert Roessler:
In the simplest case, I am doing exactly a start_styling with INDICS_MASK (0xe0), followed by a set_styling for the required length - all with default settings for the indicator styles and colors.
This works fine... if I only use indicator #2! If I use either #0 or #1, my displayed text has its styling messed up when I *overwrite* indicators.
You need to set the mask to one of INDIC0_MASK, INDIC1_MASK, or INDIC2_MASK depending on which bit you want to write or clear. If you want to write all three bits in one pass then you will have to maintain your own bit set.
I think we are not communicating... I am doing just what the doc says:
"The indicators are set using SCI_STARTSTYLING with a INDICS_MASK mask and SCI_SETSTYLING with the values INDIC0_MASK, INDIC1_MASK and INDIC2_MASK."
So that is exactly what I do... my use of the shorthand "indicator #2" etc may have obscured this. :( I really do a SCI_STARTSTYLING with INDICS_MASK and a SCI_SETSTYLING with ONE of INDIC0_MASK, INDIC1_MASK, or INDIC2_MASK... but only the last one actually works properly - in the sense of not messing up in the way I describe in my initial mail.
So am I still not getting something?
You have to specify : SCI_STARTSTYLING (INDIC0_MASK) for example, then continue with: SCI_SETSTYLING(0) to remove this particular flag or SCI_SETSTYLING(INDIC0_MASK) to put it.
This is just binary stuff, the new indicators are: (old_indicators AND NOT mask) OR (new_indicators AND MASK). Does it help?
This is what I understood from the doc. Armel
_______________________________________________ Scintilla-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scintilla-interest
