Bram,
when using Visual-block insert or append, you can't use the cursor keys
to move the cursor to a different location. This will confuse vim.
e.g. consider this block
aaaaaaa
bbbbbbb
ccccccc
Put the Cursor on the first a, and press
l<C-V>jjlllI<Right><Right><Space><Space>
The result will look like this:
aaa aaaa
baabbbbbb
caacccccc
While the result should look like this
aaa aaaa
bbb bbbb
ccc cccc
Attached patch fixes it. It is a little bit fragile, because it depends
on the '[ mark being set correctly, but it seems to work pretty well. If
some plugin messes with this mark in Visual-block mode, it will probably
not be worse then the current situation, so this should be ok.
BTW: I tried to make a new test case for this, but failed, because you
can't use <C-O> in Visual-block Insert/Append mode (this should probably
also be fixed sometimes, this is pretty obvious, since the op_change()
function doesn't care about the return value of the edit() function) and
using the raw terminal keys e.g. <ESC>OC for right are taken literally.
Disclaimer, this problem has first been mentioned at stackoverflow:
http://stackoverflow.com/questions/19030928
regards,
Christian
--