[Lazarus] Code Folding mess and Code Divider feature

Martin Friebe lazarus at mfriebe.de
Fri Mar 13 16:52:27 CET 2009


Graeme Geldenhuys wrote:
> In that case the first picture is wrong => with DDL=1 there should be no
>> line between procedures (it would be at the end of the unit level.)
>> Not sure if complete:
>> DDL 1: unit level
>> DDL 2: implementation/ interface
>> DDL 3: Procedure implementation / class declaration
>>     
>
> ah, nice to actually know what each level means. :-) Maybe that should
> be place in the options screen instead of just numbers.
>   
In a "program" it differs from a "unit", because you do not have the 
implementation/interface section.
Include files may differ again.

Those differences were always present, even with the older folding. The 
level only represents how many nested folds you have

Unit: is the top level fold; not nested
implementation/ interface: is nested in the unit fold
procedures are nested into the implantation fold
......

>> since you only switched tabs => did you aybe change config in your
>> session? maybe the issue was that the config change was not set to all
>> editors?
>>     
>
> That seems to be the partial cause. Setting the level to 3 gives the
> most desirable outcome I wanted. But only after I restarted Lazarus,
> did all the editors update. So there is one bug - not all editors get
> updated.
>   
Ok, I will check this part: "proper propagation of config changes, with 
regards to divider fold level"

> I then played with the levels to see how they differ. After changing
> the level, i did a Lazarus restart. It seems at Level = 2, I again get
> the same behaviour as the bug report. Even with a restart. So that
> seems to be another bug.
>   
Are all 3 files units? with unit keyword at the start, and 
implementation/interface sections....
if you have an include file, with no "unit", no "interface" / 
"implementation" => then "procedure" is the top level fold (divider 
level = 1)

I will need some feedback to reproduce this.

Or if the behaviour is due to differences in the nesting structure, then 
the bug breaks down into:
- propagation (see above)
- restore the old behaviour that "procedure" divider lines, can be drawn 
independent of the fold-nest level.
  (they used to be top level, which is why they used to be content 
independent => that has changed)


Best Regards
Martin



More information about the Lazarus mailing list