On 31/10/2012 00:28, RaptorX wrote:
1) A lexer cannot (or should not) change the content of the display nor hide or add
characters. Beside, it isn't convenient: if it is, for example, a markup lexer, I can
understand you want to show the effect and not the markup, but then the user depends on
the client around Scintilla to add or remove these marks.
In this case, you are not looking for Scintilla, but for some rich text edit component...
2) A lexer doesn't change the attributes (bold, italic, font choice, size...) of the text,
it only marks part of the text with a number (the lexer style id) and another part maps
this number to a concrete style. It is the responsibility of the client to ensure a given
id is always displayed as bold.
I am not trying to be dogmatic, just pointing out the way all the lexers (that I have
looked at) work... If you need to change the way Scintilla works, well, you have to patch
it. :-) (But it won't work if you aim to ship a lexer working with vanilla Scintilla.)
-- -- -- -- -- -- -- -- -- -- -- -- -- --