updated for version 7.4.552
Problem: Langmap applies to Insert mode expression mappings.
Solution: Check for Insert mode. (Daniel Hahler)
diff --git a/src/getchar.c b/src/getchar.c
index c9ee4d0..174cfa8 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -2145,7 +2145,7 @@
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 e257277..5f895a4 100644
--- a/src/testdir/test_mapping.in
+++ b/src/testdir/test_mapping.in
@@ -8,6 +8,15 @@
: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
diff --git a/src/testdir/test_mapping.ok b/src/testdir/test_mapping.ok
index abdaea6..8d94976 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 6408d57..e8d7525 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 552,
+/**/
551,
/**/
550,