On 29 Apr 2005 at 20:30, Robert Roessler wrote:
Jan Martin Pettersen wrote:
On 28 Apr 2005 at 12:52, Robert Roessler wrote: ... An example:
SCI_STARTSTYLING(0,INDICS_MASK) SCI_SETSTYLING(20,INDIC0_MASK) SCI_STARTSTYLING(oldstylepos,oldstylemask)
This would set the indicator 0 for the 20 next characters, and if indicator 1 or 2 also was defined in those chars, then those indicators would be removed for that length. i.e the last indicator set for a length would be the ONLY indicator.
IBut if you use the INDIC0_MASK for the SCI_STARTSTYLING, THEN you would just modify that indicator, and not the rest if any.
I had a little trouble with it myself, but found a solution, and it works..
Thanks for the help - none of my trouble was in setting the indicators OR clearing them... it was ALL about how the "indicators" feature plays with a lexer already handling the buffer! :)
:) All bits NOT used by the lexer (you'll see which it uses by the masks used in Accessor::StartAt or StyleContext constructor calls inside the lexers) are available for indicators, and isn't seen nor touched by them.. (starting with version 1.63, or was it 1.62).
That would be the answer to the point I think..
An example: If you play with indicicator 0 when using the hypertext (0x7f) lexer, then the styling is messed up, because the hypertext lexers use all bits but 1 (indicator 2)
I use the GetStyleBits to determine which I can use for indicators (I set the stylebits in another place based on the lexer),
and also to create an opposite mask for the last (resetting) SCI_STARTSTYLING
call because all lexers I use doesn't have the 0x1f mask.
It was NOTHING about the bits - it was reasonably clear how to use indicators in this respect from the beginning! The ONLY problem was with the "last known styled" position not being saved and restored by my code writing and clearing indicators - and I have offered to update the Scintilla doc to make it harder to make this mistake. :)
Robert Roessler [EMAIL PROTECTED] http://www.rftp.com _______________________________________________ Scintilla-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scintilla-interest
