diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c index 0b2cf6ea47..ce4c0586e3 100644 --- a/src/nvim/mapping.c +++ b/src/nvim/mapping.c @@ -1194,7 +1194,7 @@ static char *translate_mapping(char_u *str, int cpo_flags) } if (c == ' ' || c == '\t' || c == Ctrl_J || c == Ctrl_V - || (c == '\\' && !cpo_bslash)) { + || c == '<' || (c == '\\' && !cpo_bslash)) { ga_append(&ga, cpo_bslash ? Ctrl_V : '\\'); } diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim index 30d30c8b29..6d7f1649b3 100644 --- a/src/nvim/testdir/test_autocmd.vim +++ b/src/nvim/testdir/test_autocmd.vim @@ -2720,7 +2720,7 @@ func Test_autocmd_bufreadpre() close close call delete('XAutocmdBufReadPre.txt') - " set cpo-=g + set cpo-=g endfunc " FileChangedShell tested in test_filechanged.vim diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index cf1d56ae38..64bfb142e7 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -340,7 +340,7 @@ func Test_map_completion() call feedkeys(":map \\"\", 'xt') call assert_equal('"map ', getreg(':')) call feedkeys(":map \\"\", 'xt') - " call assert_equal("\"map ", getreg(':')) + call assert_equal("\"map ", getreg(':')) unmap " set cpo+=< @@ -369,7 +369,7 @@ func Test_map_completion() call feedkeys(":map \\"\", 'xt') call assert_equal('"map ', getreg(':')) unmap - " set cpo-=k + set cpo-=k call assert_fails('call feedkeys(":map \\\\%(\\\"\", "xt")', 'E53:')