[vim] Fix logic for text object selection and add tests.