fixed bug when press `tab` and press the second char.