mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-10 09:39:25 +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
|
||||
if (TopPascalCodeFoldBlockType = cfbtCase) then begin
|
||||
EndPascalCodeFoldBlock();
|
||||
StartPascalCodeFoldBlock(cfbtCase);
|
||||
StartPascalCodeFoldBlock(cfbtCase, True);
|
||||
fRange := fRange + [rsAtCaseLabel];
|
||||
end;
|
||||
end
|
||||
@ -1082,7 +1082,7 @@ begin
|
||||
end
|
||||
else if KeyComp('Case') then begin
|
||||
if TopPascalCodeFoldBlockType in PascalStatementBlocks + [cfbtUnitSection] then
|
||||
StartPascalCodeFoldBlock(cfbtCase);
|
||||
StartPascalCodeFoldBlock(cfbtCase, True);
|
||||
Result := tkKey;
|
||||
end
|
||||
else
|
||||
@ -1204,7 +1204,7 @@ begin
|
||||
end else
|
||||
if TopPascalCodeFoldBlockType = cfbtCase then begin
|
||||
FTokenIsCaseLabel := True;
|
||||
StartPascalCodeFoldBlock(cfbtCaseElse);
|
||||
StartPascalCodeFoldBlock(cfbtCaseElse, True);
|
||||
end
|
||||
end
|
||||
else if KeyComp('Var') then begin
|
||||
@ -2019,7 +2019,7 @@ begin
|
||||
EndPascalCodeFoldBlockLastLine;
|
||||
end;
|
||||
if TopPascalCodeFoldBlockType = cfbtCase then begin
|
||||
StartPascalCodeFoldBlock(cfbtCaseElse);
|
||||
StartPascalCodeFoldBlock(cfbtCaseElse, True);
|
||||
FTokenIsCaseLabel := True;
|
||||
end;
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user