Handle EOF in text-fe