anchor.diff:    AllowDraw := True;
     { end-user can hook in here to do syntax highlighting and other custom drawing }
     if Assigned(FOnDrawLine) then
  -    FOnDrawLine(self, S, I, Canvas, R, AllowDraw);
  +    FOnDrawLine(self, S, ALineIndex, Canvas, R, AllowDraw);
     { Draw simple text line... }
     if AllowDraw then
     begin
       Canvas.DrawText(R, S);
       if FSelected then
       begin
  -      if (I > StartNo) and (I < EndNo) then     // whole line is selected
  +      if (ALineIndex > StartNo) and (ALineIndex < EndNo) then     // whole line is selected
         begin
           R.SetRect(X, Y, UTF8Length(S) * FChrW, FChrH);
           Canvas.XORFillRectangle(fpgColorToRGB(clSelection) xor $FFFFFF, R);
  
positive.code:       begin
          Ei := EndOffs;
          Si := StartOffs;
          if (I = StartNo) and (I = EndNo) then  // start/end selection on same line
          begin
            SS := UTF8Copy(S, Si + 1, UTF8Length(S) - Si);
            if Ei > UTF8Length(S) then
  
negative.code:   end;
  end;
  
  procedure TfpgBaseTextEdit.DrawLine(const ALineIndex, Y: Integer);
  var
    X: Integer;
    GSz: Integer;
  