TodoListLaz: fix SynEdit markup for comments, if comments contain PasDoc (one comment returns multiple tokens)

This commit is contained in:
Martin 2025-03-23 00:31:39 +01:00
parent c118272fc2
commit bc80222f69

View File

@ -451,6 +451,11 @@ begin
FPasHl.StartAtLineIndex(ToIdx(pos.Y));
FPasHl.NextToLogX(pos.X);
TkEnd := ToPos(FPasHl.GetTokenPos) + FPasHl.GetTokenLen;
while (not FPasHl.GetEol) and (not FPasHl.GetTokenIsCommentEnd) do begin
FPasHl.Next;
if not FPasHl.GetTokenIsComment then break;
TkEnd := ToPos(FPasHl.GetTokenPos) + FPasHl.GetTokenLen;
end;
i := Length(FFoundPos);
SetLength(FFoundPos, i + 1);