Mercurial > vim
changeset 6445:c8d6dbdd1156 v7.4.552
updated for version 7.4.552
Problem: Langmap applies to Insert mode expression mappings.
Solution: Check for Insert mode. (Daniel Hahler)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 14 Dec 2014 00:43:54 +0100 |
parents | 855584efa63b |
children | cf4a4806124d |
files | src/getchar.c src/testdir/test_mapping.in src/testdir/test_mapping.ok src/version.c |
diffstat | 4 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/getchar.c +++ b/src/getchar.c @@ -2145,7 +2145,7 @@ vgetorpeek(advance) nolmaplen = 2; else { - LANGMAP_ADJUST(c1, TRUE); + LANGMAP_ADJUST(c1, (State & INSERT) == 0); nolmaplen = 0; } #endif
--- a/src/testdir/test_mapping.in +++ b/src/testdir/test_mapping.in @@ -8,6 +8,15 @@ STARTTEST :inoreab чкпр vim GAчкпр + +: " langmap should not get remapped in insert mode +:inoremap { FAIL_ilangmap +:set langmap=+{ langnoremap +o+ +: " expr mapping with langmap +:inoremap <expr> { "FAIL_iexplangmap" +o+ + :/^test/,$w! test.out :qa! ENDTEST