fix text-mode tab key issue