anchor.diff:    FSelStartLine   := FCursorLine;
     FSelEndLine     := FCursorLine;
     FMouseDragging  := False;
  +end;
  +
  +procedure TfpgMemo.SetCursorPos(const AValue: integer);
  +var
  +  x: integer;
  +begin
  +  if FCursorPos = AValue then
  +    exit;
  +
  +  if AValue = 0 then
  +    FCursorPos := AValue
  +  else
  +  begin
  +    x := UTF8Length(FLines[CursorLine]);
  +    if AValue > x then  { can't set Cursorpos greater than number of characters on that line }
  +      FCursorPos := x
  +    else
  +      FCursorPos := AValue;
  +  end;
  +  FSelStartPos  := FCursorPos;
  +  FSelEndPos    := FCursorPos;
  +  AdjustCursor;
  +  Repaint;
   end;
   
   constructor TfpgMemo.Create(AOwner: TComponent);
  
positive.code:     procedure   ShowDefaultPopupMenu(const x, y: integer; const shiftstate: TShiftState); virtual;
      procedure   SetReadOnly(const AValue: Boolean);
      procedure   ResetSelectionVariables;
    protected
      procedure   HandleKeyChar(var AText: TfpgChar; var shiftstate: TShiftState; var consumed: boolean); override;
      procedure   HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); override;
  
negative.code:     procedure   Clear;
      procedure   BeginUpdate;
      procedure   EndUpdate;
      property    CursorPos: integer read FCursorPos write SetCursorPos;
      property    CursorLine: integer read FCursorLine write SetCursorLine;
      property    Font: TfpgFont read FFont;
      property    LineHeight: integer read FLineHeight;
  