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)
|
if (c1 == K_SPECIAL)
|
||||||
nolmaplen = 2;
|
nolmaplen = 2;
|
||||||
else {
|
else {
|
||||||
LANGMAP_ADJUST(c1, (State & INSERT) == 0);
|
LANGMAP_ADJUST(c1, (State & (CMDLINE | INSERT)) == 0);
|
||||||
nolmaplen = 0;
|
nolmaplen = 0;
|
||||||
}
|
}
|
||||||
/* First try buffer-local mappings. */
|
/* First try buffer-local mappings. */
|
||||||
|
@ -88,7 +88,7 @@ static int included_patches[] = {
|
|||||||
776,
|
776,
|
||||||
775,
|
775,
|
||||||
774,
|
774,
|
||||||
//773,
|
773,
|
||||||
//772,
|
//772,
|
||||||
//771,
|
//771,
|
||||||
//770,
|
//770,
|
||||||
|
@ -23,16 +23,27 @@ describe('mapping', function()
|
|||||||
execute('set langmap=+{ langnoremap')
|
execute('set langmap=+{ langnoremap')
|
||||||
feed('o+<esc>')
|
feed('o+<esc>')
|
||||||
|
|
||||||
-- expr mapping with langmap.
|
-- Insert mode expr mapping with langmap.
|
||||||
execute('inoremap <expr> { "FAIL_iexplangmap"')
|
execute('inoremap <expr> { "FAIL_iexplangmap"')
|
||||||
feed('o+<esc>')
|
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.
|
-- Assert buffer contents.
|
||||||
expect([[
|
expect([[
|
||||||
test starts here:
|
test starts here:
|
||||||
vim
|
vim
|
||||||
+
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
+]])
|
+]])
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user