ecSyntMemo.pas

procedure TCustomSyntaxMemo.MouseUp ..
begin
  inherited;
  ResetHint;
  FDragging := False;
  FDraggedTextMargin := nil;
  FScrollTimer.Enabled := False;

  //AT
  //turn off auto-scroll, only if we have dragging
  if (Button = mbMiddle) and
    FDoScroll and
    (Sqr(X - FDoScrollOrg.X) + Sqr(Y - FDoScrollOrg.Y) >= 25) then
  begin
    FDoScroll:= false;
    FTimerScroll.Enabled:= false;
    Cursor:= crIBeam;
    Invalidate;
    Exit
  end;

  if FDragStaple <> nil then
..
