kurkale6ka/vim-swap — pull request #5 by lambdalisue (2014-07-24 07:50:00+00:00)
Title: Fix Vim crash issue with virtualedit=all

Vim would crash when `setpos` is called with a value obtain from `getpos` if
the `virtualedit=all` is specified.
This is based on a reported bug of Vim but appling patch is quite tough
job for ordinal user, so I change the plugins behavior in the critical
case.

With this commit, the cursor position is not correctly restored when
user select text in visual mode and `virtualedit=all` is specified.
However it is much better than CRASH.
It should not affect the user who does not specify `virtualedit=all` in
them vimrc.

Bug: https://groups.google.com/forum/#!topic/vim_dev/AK_HZ-5TeuU

I'm using `virtualedit=all` thus I made this PR. Please check it :-)