Fix tab completion clearing previous word when current word is blank.