vim-patch:7.4.773 #3066

Problem:  'langmap' is used in command-line mode when checking for mappings.
Solution: Do not use 'langmap' in command-line mode. (Larry Velazquez)

Original patch:
  https://code.google.com/p/vim/source/detail?r=5b1eefbf9a532f32a66fa13abbd671488aaafd5c
This commit is contained in:
Marco Hinz 2015-07-21 15:11:56 +02:00 committed by Justin M. Keyes
parent 3df37a8424
commit 990c0350ab
3 changed files with 14 additions and 3 deletions

View File

@ -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. */

View File

@ -88,7 +88,7 @@ static int included_patches[] = {
776,
775,
774,
//773,
773,
//772,
//771,
//770,

View File

@ -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)