On 09/07/2007 00:45, Chris Colman wrote:
I don't understand why the 'find matching brace' methods would have
anything to do with text styling though. Isn't text styling just a
visual thing and finding a matching brace purely looking at the raw text
in the document? Obviously once a match is found we enter the styling
world when it comes to displaying that match as a highlight but I can't
see why the 'search' part would have anything to do with styling.

Because most of the time, we want to match braces of same syntactic level... If I have a "}" string in a code block, I don't want Scintilla to jump there instead of the end of the code block when I ask the matching brace. The easiest way to do this is to use the existing styling. The other way would be do re-parse all code between the current brace and the would-be matching brace... The only current problem, at least in SciTE, I don't know if it is a limitation of Scintilla itself, is that we can specify only one matching style. Ie. if I have braces in one style, and parentheses in another style (or parentheses in both styles), I have to choose one matching style or another, not both. Of course, one symbol in a style will never match the corresponding symbol in another style!

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

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

Reply via email to