diff --git a/components/synedit/synhighlighterpas.pp b/components/synedit/synhighlighterpas.pp index 85bd3c4db9..d3abf019ef 100644 --- a/components/synedit/synhighlighterpas.pp +++ b/components/synedit/synhighlighterpas.pp @@ -799,7 +799,7 @@ begin end else if TopPascalCodeFoldBlockType = cfbtUnitSection then begin EndCodeFoldBlockLastLine; - if TopPascalCodeFoldBlockType = cfbtBeginEnd then // "Unit".."end." + if TopPascalCodeFoldBlockType = cfbtUnit then // "Unit".."end." EndCodeFoldBlock; end else begin if TopPascalCodeFoldBlockType = cfbtClassSection then