SynEdit: PasHighLighter, do not change FRange when processing comments

(cherry picked from commit 434454b4ed)
This commit is contained in:
Martin 2025-03-16 15:29:11 +01:00
parent fd2daa7db3
commit d1120b1898

View File

@ -5246,7 +5246,10 @@ begin
BlockType := TopPascalCodeFoldBlockType;
if BlockType in [cfbtVarType, cfbtLocalVarType] then
fRange := fRange - [rsInTypeBlock, rsInConstBlock];
fRange := fRange - [rsAfterEqual];
if not (BlockType in [cfbtAnsiComment, cfbtBorCommand, cfbtSlashComment, cfbtNestedComment,
cfbtIfDef, cfbtRegion]) // cfbtAnonymousProcedure
then
fRange := fRange - [rsAfterEqual];
DecreaseLevel := TopCodeFoldBlockType < CountPascalCodeFoldBlockOffset;
// TODO: let inherited call CollectNodeInfo
if IsCollectingNodeInfo then begin // exclude subblocks, because they do not increase the foldlevel yet