From 5000869712f799d9ca25c0e45dc21d332edae5f4 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 14 Jan 2015 16:08:32 +0100 Subject: [PATCH] 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. --- src/testdir/test_mapping.in | 14 ++++++++++---- src/testdir/test_mapping.ok | 1 + src/ui.c | 2 +- src/version.c | 2 ++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/testdir/test_mapping.in b/src/testdir/test_mapping.in index c957569f4..7ac578f08 100644 --- 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 index cd0e2e1ca..bf21e514b 100644 --- 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 index 6fc5bde21..59794829d 100644 --- 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; } diff --git a/src/version.c b/src/version.c index b049ea229..ed1a6e341 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 573, /**/ 572, /**/ -- 2.50.1