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 ANSI version of SynEdit. However, I'm not getting the same result with the latest UNICODE version.
if the instruction occupies only one line, only one symbol "[] {} or ()" near at the cursor is mistakenly highlighted, which closes not.
In other words, when you click on the first bracket "(" the last bracket ")" doesn't change color. It should color the start and end tag. For example, considering "|" as the cursor position:
(|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 code below (IceMan is the original author) works fine for me: