mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 03:39:36 +02:00
SynEdit: Pas HL, fix folding/markup for code containing "case", if "case" is not enabled for fold/markup. Part 1 of Issue #0034410
git-svn-id: trunk@59297 -
This commit is contained in:
parent
5bbd8d5a05
commit
6769e903a6
@ -971,7 +971,7 @@ begin
|
|||||||
else
|
else
|
||||||
if (TopPascalCodeFoldBlockType = cfbtCase) then begin
|
if (TopPascalCodeFoldBlockType = cfbtCase) then begin
|
||||||
EndPascalCodeFoldBlock();
|
EndPascalCodeFoldBlock();
|
||||||
StartPascalCodeFoldBlock(cfbtCase);
|
StartPascalCodeFoldBlock(cfbtCase, True);
|
||||||
fRange := fRange + [rsAtCaseLabel];
|
fRange := fRange + [rsAtCaseLabel];
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
@ -1082,7 +1082,7 @@ begin
|
|||||||
end
|
end
|
||||||
else if KeyComp('Case') then begin
|
else if KeyComp('Case') then begin
|
||||||
if TopPascalCodeFoldBlockType in PascalStatementBlocks + [cfbtUnitSection] then
|
if TopPascalCodeFoldBlockType in PascalStatementBlocks + [cfbtUnitSection] then
|
||||||
StartPascalCodeFoldBlock(cfbtCase);
|
StartPascalCodeFoldBlock(cfbtCase, True);
|
||||||
Result := tkKey;
|
Result := tkKey;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -1204,7 +1204,7 @@ begin
|
|||||||
end else
|
end else
|
||||||
if TopPascalCodeFoldBlockType = cfbtCase then begin
|
if TopPascalCodeFoldBlockType = cfbtCase then begin
|
||||||
FTokenIsCaseLabel := True;
|
FTokenIsCaseLabel := True;
|
||||||
StartPascalCodeFoldBlock(cfbtCaseElse);
|
StartPascalCodeFoldBlock(cfbtCaseElse, True);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else if KeyComp('Var') then begin
|
else if KeyComp('Var') then begin
|
||||||
@ -2019,7 +2019,7 @@ begin
|
|||||||
EndPascalCodeFoldBlockLastLine;
|
EndPascalCodeFoldBlockLastLine;
|
||||||
end;
|
end;
|
||||||
if TopPascalCodeFoldBlockType = cfbtCase then begin
|
if TopPascalCodeFoldBlockType = cfbtCase then begin
|
||||||
StartPascalCodeFoldBlock(cfbtCaseElse);
|
StartPascalCodeFoldBlock(cfbtCaseElse, True);
|
||||||
FTokenIsCaseLabel := True;
|
FTokenIsCaseLabel := True;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user