[vim] improve handling of external selections

makes sure state of the selection and visualMode are always in sync
Why do you need to check `lineLength(cm, head.line) > head.ch`?