SynEdit: Fixed folding in "label" code. Issue #0024417

git-svn-id: trunk@41129 -
This commit is contained in:
martin 2013-05-11 12:48:46 +00:00
parent 78f5a14553
commit 4c54591946

View File

@ -1003,9 +1003,24 @@ end;
function TSynPasSyn.Func32: TtkTokenKind;
begin
if KeyComp('Label') then Result := tkKey else
if KeyComp('Mod') then Result := tkKey else
if KeyComp('File') then Result := tkKey else Result := tkIdentifier;
if KeyComp('Label') then begin
if (TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType, cfbtNone,
cfbtProcedure, cfbtProgram, cfbtUnit, cfbtUnitSection])
then begin
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
EndPascalCodeFoldBlockLastLine;
if TopPascalCodeFoldBlockType in [cfbtProcedure]
then StartPascalCodeFoldBlock(cfbtLocalVarType)
else StartPascalCodeFoldBlock(cfbtVarType);
end;
Result := tkKey;
end
else
if KeyComp('Mod') then Result := tkKey
else
if KeyComp('File') then Result := tkKey
else
Result := tkIdentifier;
end;
function TSynPasSyn.Func33: TtkTokenKind;