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 bbeef376b0..6a6e4f2214 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1758,7 +1758,7 @@ static int vgetorpeek(int advance) if (c1 == K_SPECIAL) nolmaplen = 2; else { - LANGMAP_ADJUST(c1, (State & INSERT) == 0); + LANGMAP_ADJUST(c1, (State & (CMDLINE | INSERT)) == 0); nolmaplen = 0; } /* First try buffer-local mappings. */ diff --git a/src/nvim/version.c b/src/nvim/version.c index 991d4b9264..4b9142323d 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -88,7 +88,7 @@ static int included_patches[] = { 776, 775, 774, - //773, + 773, //772, //771, //770, diff --git a/test/functional/legacy/mapping_spec.lua b/test/functional/legacy/mapping_spec.lua index c387d7484c..0843506827 100644 --- a/test/functional/legacy/mapping_spec.lua +++ b/test/functional/legacy/mapping_spec.lua @@ -23,16 +23,27 @@ describe('mapping', function() execute('set langmap=+{ langnoremap') feed('o+<esc>') - -- expr mapping with langmap. + -- Insert mode expr mapping with langmap. execute('inoremap <expr> { "FAIL_iexplangmap"') feed('o+<esc>') + -- langmap should not get remapped in cmdline mode. + execute('cnoremap { FAIL_clangmap') + feed('o+<esc>') + execute('cunmap {') + + -- cmdline mode expr mapping with langmap. + execute('cnoremap <expr> { "FAIL_cexplangmap"') + feed('o+<esc>') + execute('cunmap {') -- Assert buffer contents. expect([[ test starts here: vim + + + + + +]]) end) end) |