]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.573 v7.4.573
authorBram Moolenaar <Bram@vim.org>
Wed, 14 Jan 2015 15:08:32 +0000 (16:08 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 14 Jan 2015 15:08:32 +0000 (16:08 +0100)
Problem:    Mapping CTRL-C in Visual mode doesn't work. (Ingo Karkat)
Solution:   Call get_real_state() instead of using State directly.

src/testdir/test_mapping.in
src/testdir/test_mapping.ok
src/ui.c
src/version.c

index c957569f4d8835bf3d71ab12ae4cb3b257c2bb01..7ac578f086d96c5e5f58dca9bff55baabe8144e0 100644 (file)
@@ -8,7 +8,7 @@ STARTTEST
 :inoreab чкпр   vim
 GAчкпр 
 \e
-:" mapping of ctrl-c in insert mode
+:" mapping of ctrl-c in Insert mode
 :set cpo-=< cpo-=k
 :inoremap <c-c> <ctrl-c>
 :cnoremap <c-c> dummy
@@ -16,9 +16,15 @@ GAчкпр
 GA
 TEST2: CTRL-C |\ 3A|
 \e
-:nunmap <c-c>
-
-: " langmap should not get remapped in insert mode
+:unmap <c-c>
+:unmap! <c-c>
+:"
+:" mapping of ctrl-c in Visual mode
+:vnoremap <c-c> :<C-u>$put ='vmap works'
+GV\ 3
+:vunmap <c-c>
+:"
+:" langmap should not get remapped in insert mode
 :inoremap { FAIL_ilangmap
 :set langmap=+{ langnoremap
 o+\e
index cd0e2e1ca11b9cf61bc39e3e184118edf97800f9..bf21e514ba29578787b386296369af93e6077f07 100644 (file)
@@ -2,5 +2,6 @@ test starts here:
 vim
 TEST2: CTRL-C |<ctrl-c>A|
 
+vmap works
 +
 +
index 6fc5bde21cc273d828ee1123517b603b8fd28065..59794829d8c7ef039ccca6f558b7a4a31d8c625a 100644 (file)
--- a/src/ui.c
+++ b/src/ui.c
@@ -180,7 +180,7 @@ ui_inchar(buf, maxlen, wtime, tb_change_cnt)
 
        /* ... there is no need for CTRL-C to interrupt something, don't let
         * it set got_int when it was mapped. */
-       if ((mapped_ctrl_c | curbuf->b_mapped_ctrl_c) & State)
+       if ((mapped_ctrl_c | curbuf->b_mapped_ctrl_c) & get_real_state())
            ctrl_c_interrupts = FALSE;
     }
 
index b049ea22958e596ee2c89990f83e2bc1776d882a..ed1a6e341cdef6373dd3b5974cf97db3f4799cdc 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    573,
 /**/
     572,
 /**/