Done in 3.99.
Small "curiosity"...
type tfoo = class
private
a: integer;
public
end;
...
procedure bar;
var
a: integer;
begin
...
The "private" and the "var" block are closed by the "public" and "begin".
Technically the spaces at the start of the line, are part of those 2 blocks. But in order to have a nice fold-tree in the gutter, the blocks ends are moved to the line before the closing keyword (because that closing keyword (usually) opens a new block, and having close and open overlap into the same line does not look pretty.
As a result those leading spaces are not part of the "private" / "var" block. But also not of the next block. They are attributed to the enclosing block (class/procedure) and highlighted accordingly.
This does not happen if there are non-spaces on the closing line before the "public" and "begin".
Of course the attribution could be improved. This was simply the easiest way. And for now, this is "by design".
procedure foo;
begin
...
if a then begin
...
end else begin
...
end;
...
end;
Here the highlighted block works correct.
- up to and including the "end", the block above is highlighted
- on the "else" it is in neither of the "then" nor "else"s begin/end. => the procedures begin/end is active
- after and on the "begin", the block below is highlighted