From c68c72ea7bbc92ce7cc2c746ce6408dc6cbe06cd Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 14 Dec 2014 00:43:54 +0100 Subject: [PATCH] updated for version 7.4.552 Problem: Langmap applies to Insert mode expression mappings. Solution: Check for Insert mode. (Daniel Hahler) --- src/getchar.c | 2 +- src/testdir/test_mapping.in | 9 +++++++++ src/testdir/test_mapping.ok | 2 ++ src/version.c | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/getchar.c b/src/getchar.c index c9ee4d051..174cfa892 100644 --- 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 diff --git a/src/testdir/test_mapping.in b/src/testdir/test_mapping.in index e2572772c..5f895a46f 100644 --- 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 { "FAIL_iexplangmap" +o+ + :/^test/,$w! test.out :qa! ENDTEST diff --git a/src/testdir/test_mapping.ok b/src/testdir/test_mapping.ok index abdaea6a3..8d9497658 100644 --- a/src/testdir/test_mapping.ok +++ b/src/testdir/test_mapping.ok @@ -1,2 +1,4 @@ test starts here: vim ++ ++ diff --git a/src/version.c b/src/version.c index 6408d5707..e8d75252f 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 */ +/**/ + 552, /**/ 551, /**/ -- 2.40.0