int modifiers;
int cpo_bslash;
int cpo_special;
- int cpo_keycode;
ga_init(&ga);
ga.ga_itemsize = 1;
cpo_bslash = (vim_strchr(p_cpo, CPO_BSLASH) != NULL);
cpo_special = (vim_strchr(p_cpo, CPO_SPECI) != NULL);
- cpo_keycode = (vim_strchr(p_cpo, CPO_KEYCODE) == NULL);
for (; *str; ++str)
{
modifiers = *++str;
c = *++str;
}
- if (cpo_special && cpo_keycode && c == K_SPECIAL && !modifiers)
- {
- int i;
-
- /* try to find special key in termcodes */
- for (i = 0; i < tc_len; ++i)
- if (termcodes[i].name[0] == str[1]
- && termcodes[i].name[1] == str[2])
- break;
- if (i < tc_len)
- {
- ga_concat(&ga, termcodes[i].code);
- str += 2;
- continue; /* for (str) */
- }
- }
if (c == K_SPECIAL && str[1] != NUL && str[2] != NUL)
{
if (cpo_special)
set cpo+=<
map <Left> left
+ exe "set t_k6=\<Esc>[17~"
+ call feedkeys(":map \<Esc>[17~x f6x\<CR>", 'xt')
call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
call assert_equal('"map <Left>', getreg(':'))
+ call feedkeys(":map \<Esc>[17~\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal("\"map <F6>x", getreg(':'))
unmap <Left>
+ call feedkeys(":unmap \<Esc>[17~x\<CR>", 'xt')
set cpo-=<
set cpo+=B