# HG changeset patch # User Bram Moolenaar # Date 1421248112 -3600 # Node ID 8cfbc34ae4aa2b91b5b012b2e8dfe86327b449c9 # Parent 5747093513ec9728a8715488fa57de1307ab2788 updated for version 7.4.573 Problem: Mapping CTRL-C in Visual mode doesn't work. (Ingo Karkat) Solution: Call get_real_state() instead of using State directly. diff --git a/src/testdir/test_mapping.in b/src/testdir/test_mapping.in --- a/src/testdir/test_mapping.in +++ b/src/testdir/test_mapping.in @@ -8,7 +8,7 @@ STARTTEST :inoreab чкпр vim GAчкпр  -:" mapping of ctrl-c in insert mode +:" mapping of ctrl-c in Insert mode :set cpo-=< cpo-=k :inoremap :cnoremap dummy @@ -16,9 +16,15 @@ GAчкпр GA TEST2: CTRL-C |A|  -:nunmap - -: " langmap should not get remapped in insert mode +:unmap +:unmap! +:" +:" mapping of ctrl-c in Visual mode +:vnoremap :$put ='vmap works' +GV +:vunmap +:" +:" langmap should not get remapped in insert mode :inoremap { FAIL_ilangmap :set langmap=+{ langnoremap o+ diff --git a/src/testdir/test_mapping.ok b/src/testdir/test_mapping.ok --- a/src/testdir/test_mapping.ok +++ b/src/testdir/test_mapping.ok @@ -2,5 +2,6 @@ test starts here: vim TEST2: CTRL-C |A| +vmap works + + diff --git a/src/ui.c b/src/ui.c --- a/src/ui.c +++ b/src/ui.c @@ -180,7 +180,7 @@ ui_inchar(buf, maxlen, wtime, tb_change_ /* ... 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; } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 573, +/**/ 572, /**/ 571,