tommcdo/vim-exchange — pull request #27 by inkarkat (2014-06-24 14:44:28+00:00)
Title: Support :set selection=exclusive

With this, the `'>` mark points to after the end of the selection.
- Do not change the `'selection'` value when the plugin is triggered from visual mode, so that we can grab the original selection.
- Simplification: `gv` can be used instead of ``"`<" . a:type . "`>"`` to restore the original selection. This also deals with blockwise-to-end in all cases.
- For the highlighting, the end position must be corrected. Since these are byte indices, we cannot just decrement by 1, but have to subtract the length of the last selected character!