Court frees opposition newspaper editor from pre-trial detention