diff --git a/atsynedit/atsynedit_canvasproc.pas b/atsynedit/atsynedit_canvasproc.pas index 69fb13533..edbe241ac 100644 --- a/atsynedit/atsynedit_canvasproc.pas +++ b/atsynedit/atsynedit_canvasproc.pas @@ -544,14 +544,12 @@ procedure CanvasTextOut(C: TCanvas; APosX, APosY: integer; AText: atString; if ListInt[i]>AProps.ControlWidth then begin SetLength(AText, i); - break; + Break; end; - for i:= 0 to High(ListInt) do - if i=0 then - Dx[i]:= ListInt[i] - else - Dx[i]:= ListInt[i]-ListInt[i-1]; + Dx[0]:= ListInt[0]; + for i:= 1 to High(ListInt) do + Dx[i]:= ListInt[i]-ListInt[i-1]; end; if AParts=nil then