SynEdit: PasHighLighter, do not change FRange when processing comments

This commit is contained in:
Martin 2025-03-16 15:29:11 +01:00
parent e10c541331
commit 434454b4ed

View File

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