diff --git a/components/lazutils/lazutf8.pas b/components/lazutils/lazutf8.pas index 5466c159af..5f66f20567 100644 --- a/components/lazutils/lazutf8.pas +++ b/components/lazutils/lazutf8.pas @@ -3272,7 +3272,7 @@ begin Inc(N); if P^ = BreakStr[Length(BreakStr)] then N := 0; - if N > MaxCol - Indent then + if N >= MaxCol - Indent then begin Len := Length(Result); RP := Len;