Brad Campbell wrote
laz-synpatch-007.patch
This is another gross hack, but in a highlighter I've written I use
this to enable me to ensure the
remainder of a line is painted in the right background colour. Synedit
calls this "GetLineRemainder"
routine (if assigned in the highlighter) to get the colour the
remainder of the line is to be
painted after it has finished painting all its tokens. Without this I
was getting odd line
remainders when I scrolled often. With this I get perfection every time.
Not really a "gross" hack.
It slightly goes out of the current functionality of a highlighter =>
which so far is/was a token based highlighter. Line highlighting was
reserved for Markup modules.
However this is/was more be evolution as specific design. It is quite
reasonable to say that some text-formats/languages want to use full line
markup to highlight language features. (Pascal uses Divider-Lines instead).
It also does not interfere with any other functionality, and requires
very little modifications.
I have integrated this patch in Lazarus (rev 20243).
A few modifications:
Function has been renamed to have "Attribute" in name: GetEndOfLineAttribute
The parts in SynEdit have been changed to be more in line with other
code, and obey other features too.
Also note, that:
- the part in SynEdit may change in the future, but should continue to
obey the attribute returned.
- May in future obey underline or Frame color or new features. It is
therefore important to set those correctly (clNone)
Best Regards
Martin
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus