diff options
-rw-r--r-- | src/nvim/getchar.c | 2 | ||||
-rw-r--r-- | src/nvim/version.c | 2 | ||||
-rw-r--r-- | test/functional/legacy/mapping_spec.lua | 13 |
3 files changed, 14 insertions, 3 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index d0eebf8fea..e12601e4c9 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1775,7 +1775,7 @@ static int vgetorpeek(int advance) if (c1 == K_SPECIAL) nolmaplen = 2; else { - LANGMAP_ADJUST(c1, TRUE); + LANGMAP_ADJUST(c1, (State & INSERT) == 0); nolmaplen = 0; } /* First try buffer-local mappings. */ diff --git a/src/nvim/version.c b/src/nvim/version.c index 513b03095b..c1fe19bb9c 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -186,7 +186,7 @@ static int included_patches[] = { //555 NA //554, //553, - //552, + 552, //551, //550, 549, diff --git a/test/functional/legacy/mapping_spec.lua b/test/functional/legacy/mapping_spec.lua index 46d29d1692..1451b268c5 100644 --- a/test/functional/legacy/mapping_spec.lua +++ b/test/functional/legacy/mapping_spec.lua @@ -18,9 +18,20 @@ describe('mapping', function() execute('inoreab чкпр vim') feed('GAчкпр <cr><esc>') + -- langmap should not get remapped in insert mode. + execute('inoremap { FAIL_ilangmap') + execute('set langmap=+{ langnoremap') + feed('o+<esc>') + + -- expr mapping with langmap. + execute('inoremap <expr> { "FAIL_iexplangmap"') + feed('o+<esc>') + -- Assert buffer contents. expect([[ test starts here: - vim]]) + vim + + + +]]) end) end) |