mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.552
Problem: Langmap applies to Insert mode expression mappings. Solution: Check for Insert mode. (Daniel Hahler) https://code.google.com/p/vim/source/detail?r=v7-4-552
This commit is contained in:
parent
cab88790bc
commit
e27460b60c
@ -1775,7 +1775,7 @@ static int vgetorpeek(int advance)
|
|||||||
if (c1 == K_SPECIAL)
|
if (c1 == K_SPECIAL)
|
||||||
nolmaplen = 2;
|
nolmaplen = 2;
|
||||||
else {
|
else {
|
||||||
LANGMAP_ADJUST(c1, TRUE);
|
LANGMAP_ADJUST(c1, (State & INSERT) == 0);
|
||||||
nolmaplen = 0;
|
nolmaplen = 0;
|
||||||
}
|
}
|
||||||
/* First try buffer-local mappings. */
|
/* First try buffer-local mappings. */
|
||||||
|
@ -186,7 +186,7 @@ static int included_patches[] = {
|
|||||||
//555 NA
|
//555 NA
|
||||||
//554,
|
//554,
|
||||||
//553,
|
//553,
|
||||||
//552,
|
552,
|
||||||
//551,
|
//551,
|
||||||
//550,
|
//550,
|
||||||
//549,
|
//549,
|
||||||
|
@ -18,9 +18,20 @@ describe('mapping', function()
|
|||||||
execute('inoreab чкпр vim')
|
execute('inoreab чкпр vim')
|
||||||
feed('GAчкпр <cr><esc>')
|
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.
|
-- 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