From bc80222f695d1466c447b2abb09dd85abca40241 Mon Sep 17 00:00:00 2001 From: Martin Date: Sun, 23 Mar 2025 00:31:39 +0100 Subject: [PATCH] TodoListLaz: fix SynEdit markup for comments, if comments contain PasDoc (one comment returns multiple tokens) --- components/todolist/todosynmarkup.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/todolist/todosynmarkup.pas b/components/todolist/todosynmarkup.pas index 85b94c4034..d277021a18 100644 --- a/components/todolist/todosynmarkup.pas +++ b/components/todolist/todosynmarkup.pas @@ -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);