// Hitting <Down> after "emenu Name.": complete submenu
if (c == K_DOWN && cclp->cmdpos > 0
&& cclp->cmdbuff[cclp->cmdpos - 1] == '.')
+ {
c = p_wc;
+ KeyTyped = TRUE; // in case the key was mapped
+ }
else if (c == K_UP)
{
// Hitting <Up>: Remove one submenu name in front of the
if (i > 0)
cmdline_del(cclp, i);
c = p_wc;
+ KeyTyped = TRUE; // in case the key was mapped
xp->xp_context = EXPAND_NOTHING;
}
}
{
// go down a directory
c = p_wc;
+ KeyTyped = TRUE; // in case the key was mapped
}
else if (STRNCMP(xp->xp_pattern, upseg + 1, 3) == 0 && c == K_DOWN)
{
{
cmdline_del(cclp, j - 2);
c = p_wc;
+ KeyTyped = TRUE; // in case the key was mapped
}
}
else if (c == K_UP)
call feedkeys(":e Xdir1/\<Tab>\<Down>\<Up>\<Right>\<CR>", 'tx')
call assert_equal('testfile1', getline(1))
+ + " <C-J>/<C-K> mappings to go up/down directories when 'wildcharm' is
+ " different than 'wildchar'.
+ set wildcharm=<C-Z>
+ cnoremap <C-J> <Down><C-Z>
+ cnoremap <C-K> <Up><C-Z>
+ call feedkeys(":e Xdir1/\<Tab>\<C-J>\<CR>", 'tx')
+ call assert_equal('testfile3', getline(1))
+ call feedkeys(":e Xdir1/\<Tab>\<C-J>\<C-K>\<CR>", 'tx')
+ call assert_equal('testfile1', getline(1))
+ set wildcharm=0
+ cunmap <C-J>
+ cunmap <C-K>
+
" Test for canceling the wild menu by adding a character
redrawstatus
call feedkeys(":e Xdir1/\<Tab>x\<C-B>\"\<CR>", 'xt')