TurboPack / SynEdit

SynEdit is a syntax highlighting edit control, not based on the Windows common controls.
221 stars 73 forks source link

Built-in matching braces highlightiing #208

Open pyscripter opened 2 years ago

pyscripter commented 2 years ago

Discussed in https://github.com/TurboPack/SynEdit/discussions/207

Originally posted by **pyscripter** March 18, 2022 I propose to add matching-braces highlighting functionality into SynEdit, implemented with indicators: - TSynCustomHighlighter gets two attributes MatchingBraceAttri, UnbalancedBraceAttri and a Braces property ('()[]{}<>') - TSynEditorOption gets a new member eoHighlightMatchingBraces - TSynEdit.SetCaretXYEx and TSynEdit.LinesChanged clear existing matching brace indicators and check for new ones if a highlighter is attached and eoHighlightMatchingBraces is set. Given, that we use highlighter attributes, this would allow to set Foreground, Background color and font style for matching braces, but not say painting a rectangle around the matching braces.