Bug#422575: Change in CTRL-C behavior with visual block mode

Bram Moolenaar Bram at moolenaar.net
Thu Sep 20 14:24:43 UTC 2007


James Vega wrote:

> Starting in 7.0 there was a slight bug introduced with the behavior of
> using <C-c> to end a visual block insert.  This can be seen via:
> 
>   vim -u NONE -N
>   4iX<Esc>
>   yyp
>   <C-v>kIy<C-c>
> 
> The y is only inserted on the first line.  Now, the weird part is that
> <C-c> reverts back to the expected behavior if you change the above
> steps as follows:
> 
>   vim -u NONE -N
>   :map <C-c> <nop>
>   :unmap <C-c>
>   4iX<Esc>
>   yyp
>   <C-v>kIy<C-c>
> 
> What <C-c> is mapped to doesn't matter.  For some reason, the simple act
> of having mapped <C-c> at some time previous to performing a visual
> block insert causes <C-c> to act as expected.

I don't think this is a bug, it was a bug fix!  CTRL-C is used
everywhere to cancel the operation.  Thus you can use it to cancel
repeating the insert in other lines (e.g., if you change your mind while
in Insert mode).  If you do want to repeat use <Esc>.

-- 
The Law of VIM:
For each member b of the possible behaviour space B of program P, there exists
a finite time t before which at least one user u in the total user space U of
program P will request b becomes a member of the allowed behaviour space B'
(B' <= B).
In other words: Sooner or later everyone wants everything as an option.
                                        -- Vince Negri

 /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///





More information about the pkg-vim-maintainers mailing list