Christian Brabandt wrote:

> 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

I suppose so.  Or repeating the insert should be omitted.

> 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.

Can't you just use the example you gave above?  No CTRL-O there.


-- 
Eight Megabytes And Continually Swapping.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui