I'm working with Delphi 2007 and SynEdit component.
I'm the main developer of an open source editor (Tinn-R) and I'm trying to switch from the SynEdit ANSI to UNICODE.
After some months of work everything is working fine except OnPaintTransient procedure.
To try to discover the source of the problem I have tried the original demo OnPaintTransientDemo.
This works perfectly in the latest ANSY version of SynEdit. However, I'm not getting the same result with the latest UNICODE version.
If on the same line, only the symbol "[] {} or ()" near at the cursor is mistakenly highlighted, which closes not. For example:
(|aaaa) -> only ( is highlighted
(aaaa|) -> only ) is highlighted
However, if the symbols are in different lines both are correctly highlighted:
(|a
a
a
a) -> both () are highlighted
(a
a
a
a|) -> both () are highlighted
This is looking like a bug in the sources of the component!
(Doing debug I could not find the source of the bug.)
Anyone can help please?
The soluction proposed by IceMan works fine for me!
I hope it will be useful to other!
Below the original code (only with few lines commented to run in PaintTransientDemo) and indented code:
Last edit: jcfaria 2013-08-28