mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
3df37a8424
commit
990c0350ab
@ -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. */
|
||||
|
@ -88,7 +88,7 @@ static int included_patches[] = {
|
||||
776,
|
||||
775,
|
||||
774,
|
||||
//773,
|
||||
773,
|
||||
//772,
|
||||
//771,
|
||||
//770,
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user