Armel Asselin wrote:
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?
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.
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.
Thanks for looking into this Armel, but overwriting any and all existing indicators is (in this case) exactly what I want to do! :)
And since I am only using ONE indicator anyway, this should appear exactly the same as if the new indicator was being ORed with any existing ones, right?
In any case, I *can* make the "indicators" feature work for me - but only for ONE indicator - indicator #2... so something does look broken. :(
Here are two pictures - the ONLY difference between them is the "BAD" one uses indicator #1 (0x40) instead of #2 (0x80). Both use the full indicator mask (0xe0), and both use the style INDIC_DIAGONAL, color 0xff00ff.
The first indicator use covers the first 4 lines - the second indicator use ONLY over-writes 7 chars (starting with the third one) of the FOURTH line... the BAD picture shows what happens.
One more data point: I can do a SCI_GETSTYLEDTEXT call to see what has been placed in the style bytes... and they look FINE. In the GOOD case, I get a bunch of 0x8X bytes, and in the BAD case I get 0x4X bytes (with the same lower 5 bits). Oh, and SCI_GETSTYLEBITS returns - as expected - 5.
Robert Roessler [EMAIL PROTECTED] http://www.rftp.com
<<inline: indic-GOOD.gif>>
<<inline: indic-BAD.gif>>
_______________________________________________ Scintilla-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scintilla-interest
