readline_finish: finish the readline mode