[Lazarus] Synedit Gutter - current line number a different color

Martin lazarus at mfriebe.de
Fri Sep 16 11:22:22 CEST 2011


On 16/09/2011 10:11, Graeme Geldenhuys wrote:
> Hi,
>
> Attached is a screenshot of how my Lazarus editor now looks.  I used to
> have the current line in the editor source code with a slightly dulled
> background color, but that interfered (made it hard to see) the Special
> Characters (tab characters) I now have enabled.
>
> I couldn't see an option for this, so I hacked my copy of SynEdit to
> draw the current line number in a different color instead.
> I attached the patch if anybody else wanted to apply something similar
> to their Lazarus.
At some time, a second attribute for current line (fore/back/frame color 
may be added.

but also the overall gutter (not just the line part) needs this => so 
you can draw a diff background color over the entire gutter width. 
(individual gutter parts, then can either accept it, or have their own 
background...


>
> PS:
> I believe when changing the source code current line background color,
> it cause more redrawing in Synedit - thus slowing down the editor a bit.
> Maybe just painting the gutter line number keeps the performance - but
> with a similar effect?

Depends wjhat exactly on your system causes the slowdown.

Using background color may use different settings between opaque and 
none paque text output.
using background color would use opaque, which should be faster as it 
can ignore the old background... On the other hand that's a guess.

Also when changing line, cursor up/down the entire line needs to be 
repainted once









More information about the Lazarus mailing list