mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(mappings): make "<" escaping in completion match Vim
This commit is contained in:
parent
f905ab0450
commit
75dab3cf07
@ -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 : '\\');
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -340,7 +340,7 @@ func Test_map_completion()
|
||||
call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
|
||||
call assert_equal('"map <Left>', getreg(':'))
|
||||
call feedkeys(":map <M\<Tab>\<Home>\"\<CR>", 'xt')
|
||||
" call assert_equal("\"map <M\<Tab>", getreg(':'))
|
||||
call assert_equal("\"map <M\<Tab>", getreg(':'))
|
||||
unmap <Left>
|
||||
|
||||
" set cpo+=<
|
||||
@ -369,7 +369,7 @@ func Test_map_completion()
|
||||
call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
|
||||
call assert_equal('"map <Left>', getreg(':'))
|
||||
unmap <Left>
|
||||
" set cpo-=k
|
||||
set cpo-=k
|
||||
|
||||
call assert_fails('call feedkeys(":map \\\\%(\<Tab>\<Home>\"\<CR>", "xt")', 'E53:')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user