Mercurial > vim
changeset 6491:8cfbc34ae4aa v7.4.573
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.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 14 Jan 2015 16:08:32 +0100 |
parents | 5747093513ec |
children | 1e3ac0aca071 |
files | src/testdir/test_mapping.in src/testdir/test_mapping.ok src/ui.c src/version.c |
diffstat | 4 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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 <c-c> <ctrl-c> :cnoremap <c-c> dummy @@ -16,9 +16,15 @@ GAчкпр GA TEST2: CTRL-C |A| -: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 +:vunmap <c-c> +:" +:" langmap should not get remapped in insert mode :inoremap { FAIL_ilangmap :set langmap=+{ langnoremap o+
--- a/src/testdir/test_mapping.ok +++ b/src/testdir/test_mapping.ok @@ -2,5 +2,6 @@ test starts here: vim TEST2: CTRL-C |<ctrl-c>A| +vmap works + +
--- 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; }