localize selection state to allow different states across tabs
lastSelection should also track and update visualLine and visualMode.

We also need to signal the appropriate mode change.