I fixed the painting of the marks and line numbers.
Where I can find the code folding algorithm within Lazarus source code? I'd
like to add {$REGION} feature. I found this folding directive help alot, also
for Delphi compatibility.
The code folding feature is great and nice, it "cleans up" our codes so we can
focus only on part of the code we want to work at.
For example I fold a region from line 503 to 511. The line with the +
now has line number 551, it should be 503.
It seems Lazarus code folding algorithm based on begin-end pair. That's why it
can't fold class type definition or case block (has end, has no begin). So
far, begin-end algorithm is good enough. But, I think it need to be improved a
little bit. The folded line should be started on the "owner" of begin-end
block pair, instead of the "begin" itself. For example:
if True then
begin
bla..bla..bla..
end;
folded as:
[+] if True then ...
The + sign should be on the "if" line instead of "begin" line. This would also
solve procedure/function declaration. For example:
procedure Test;
var
i: integer;
begin
bla..bla..bla..
end;
folded as:
[+] procedure Test; ...
The + sign should be on the "procedure" line instead of "begin" line because
begin-end pair belongs to procedure declaration. Make the line that has + sign
as read-only line would be nice. An additional [...] mark at the of the line
will be catchy for the reader's eyes too, and show the differences between
folded lines and unfolded lines. :)
What do you think?
-Bee-
has Bee.ography at:
http://beeography.wordpress.com
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives