anchor.diff:    if fText = '' then
       Value := 0
     else
  -    Value := StrToInt(fText);
  +    SetValueNCheckRange(StrToInt64(fText));
  +
  +  CursorPos := Min(CursorPos, Length(fText)); //In case we had leading zeros in fText string
   
     if Assigned(OnChange) then
       OnChange(Self);
  
positive.code: procedure TKMNumericEdit.ButtonClick(Sender: TObject; Shift: TShiftState);
  begin
    if Sender = fButtonDec then
      Value := Value - GetMultiplicator(Shift)
    else
    if Sender = fButtonInc then
      Value := Value + GetMultiplicator(Shift)
    else
      Exit;
  
  
negative.code:   inherited KeyDown(Key, Shift);
  
    case Key of
      VK_UP:      SetValueNCheckRange(Int64(Value) + 1 + 9*Byte(ssShift in Shift));
      VK_DOWN:    SetValueNCheckRange(Int64(Value) - 1 - 9*Byte(ssShift in Shift));
    end;
  end;
  
  