From 6769e903a6840b43aeda9a057583bec8e1ed3469 Mon Sep 17 00:00:00 2001 From: martin Date: Sun, 14 Oct 2018 23:47:42 +0000 Subject: [PATCH] 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 - --- components/synedit/synhighlighterpas.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/synedit/synhighlighterpas.pp b/components/synedit/synhighlighterpas.pp index d337ad2cce..f86d889ce3 100644 --- a/components/synedit/synhighlighterpas.pp +++ b/components/synedit/synhighlighterpas.pp @@ -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