[Lazarus] update [Re: Code Folding mess and Code Divider feature]

Martin Friebe lazarus at mfriebe.de
Fri Apr 10 13:10:41 CEST 2009

Alexander Klenin wrote:
> On Mon, Apr 6, 2009 at 08:45, Martin Friebe <lazarus at mfriebe.de> wrote:
>> Configuration has now been added. So you can fine tune which element you
>> like to be able to fold, and which elements you don't.
> I played with it, and it generally works very well, thanks ;-)
> Some minor issues:
> 1) When 'Code folding' is unchecked, other controls should probably be disabled.
>  Also, 'Enable code folding' is IMO a better name.
True, but that will be a lot easier, if folding and dividers are more 
separated (see item 3)

Dividers need a global switch too.

> 2) Language dropdown should probably have a label.
Hm, yes, "sugar" as far as I am concerned. But easy if the 2 buttons 
disappear (so it will be done together with the item 3)

> 3) 'Folding'/'Divider' buttons are slightly confusing. Maybe it is
> better to make common list
> of language constructs with additional 'Fold' checkbox, and make it
> visible only when needed?
> Alternatively, how about at least using PageControl instead of two buttons?
I don't like the page control to much, I tried it....
The more likely solution (and feedback shows it will be needed) is to 
have 2 complete independent pages in the tree on the left.

Patches are welcome, I have some other stuff that I currently prioritise 
at a higher level

> 4) Some combinations result in two dividers drawn separated by and empty line
> (e.g. after the last procedure and before the initialization section).
> IMHO in such cases
> only one divider should be drawn
Hm yes and no.

This happens with var/type and unit-sections. The reason:
 Those end before the next section, potentially including empty lines at 
their end.
 All others end before the empty lines.
So they can be separated by any amount of empty lines

Simple drop them would not work for people who have them in different 
colors (ok ,I do not honestly believe this is an issue)

An other way, would be not to determine if we already drawn some other 
divider, but instead to end those blocks always in front of any empty 
lines (as long as those empty lines are at the end of this block). It 
would however mean that (if differently colored)  the end of a 
type-block is drawn over the end of a class-block, hiding the end of the 

I am not yet sure, If, when or which way I will do that.

Best Regards

More information about the Lazarus mailing list