SynEdit, Folding: "type" does not always start a block: "foo = type string;"

git-svn-id: trunk@18799 -
This commit is contained in:
martin 2009-02-22 20:05:43 +00:00
parent 580a765d4e
commit 2f1b930d22

View File

@ -1070,9 +1070,11 @@ end;
function TSynPasSyn.Func66: TtkTokenKind;
begin
if KeyComp('Type') then begin
if (TSynPasSynRange(CodeFoldRange).BracketNestLevel = 0) and
(TopPascalCodeFoldBlockType in
[cfbtVarType, cfbtNone, cfbtProcedure, cfbtProgram, cfbtUnit, cfbtUnitSection]) then begin
if (TSynPasSynRange(CodeFoldRange).BracketNestLevel = 0)
and (TopPascalCodeFoldBlockType in
[cfbtVarType, cfbtNone, cfbtProcedure, cfbtProgram, cfbtUnit, cfbtUnitSection])
and not(rsAfterEqual in fRange)
then begin
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
StartPascalCodeFoldBlock(cfbtVarType);
end;