Problem: CTRL-N and -P on cmdline don't trigger CmdlineChanged.
Solution: Jump to cmdline_changed instead of cmdline_not_changed.
(closes #11956)
wild_type = (c == Ctrl_P) ? WILD_PREV : WILD_NEXT;
if (nextwild(&xpc, wild_type, 0, firstc != '@') == FAIL)
break;
- goto cmdline_not_changed;
+ goto cmdline_changed;
}
// FALLTHROUGH
case K_UP:
wild_type = WILD_PAGEDOWN;
if (nextwild(&xpc, wild_type, 0, firstc != '@') == FAIL)
break;
- goto cmdline_not_changed;
+ goto cmdline_changed;
}
else
{
au! CmdlineChanged
cunmap <F1>
+ let g:log = []
+ autocmd CmdlineChanged : let g:log += [getcmdline()]
+ call feedkeys(":sign \<Tab>\<Tab>\<C-N>\<C-P>\<S-Tab>\<S-Tab>\<Esc>", 'xt')
+ call assert_equal([
+ \ 's',
+ \ 'si',
+ \ 'sig',
+ \ 'sign',
+ \ 'sign ',
+ \ 'sign define',
+ \ 'sign jump',
+ \ 'sign list',
+ \ 'sign jump',
+ \ 'sign define',
+ \ 'sign ',
+ \ ], g:log)
+ let g:log = []
+ set wildmenu wildoptions+=pum
+ call feedkeys(":sign \<S-Tab>\<PageUp>\<kPageUp>\<kPageDown>\<PageDown>\<Esc>", 'xt')
+ call assert_equal([
+ \ 's',
+ \ 'si',
+ \ 'sig',
+ \ 'sign',
+ \ 'sign ',
+ \ 'sign unplace',
+ \ 'sign jump',
+ \ 'sign define',
+ \ 'sign undefine',
+ \ 'sign unplace',
+ \ ], g:log)
+ set wildmenu& wildoptions&
+ unlet g:log
+ au! CmdlineChanged
+
au! CmdlineEnter : let g:entered = expand('<afile>')
au! CmdlineLeave : let g:left = expand('<afile>')
let g:entered = 0
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1290,
/**/
1289,
/**/