mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
vim-patch:8.2.4585: cannot use keypad page-up/down for completion menu
Problem: Cannot use keypad page-up/down for completion menu.
Solution: Recognize the keypad keys. (Yegappan Lakshmanan, closes vim/vim#9963)
155b088208
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
@@ -2010,8 +2010,8 @@ static int command_line_handle_key(CommandLineState *s)
|
||||
case Ctrl_N: // next match
|
||||
case Ctrl_P: // previous match
|
||||
if (s->xpc.xp_numfiles > 0) {
|
||||
if (nextwild(&s->xpc, (s->c == Ctrl_P) ? WILD_PREV : WILD_NEXT,
|
||||
0, s->firstc != '@') == FAIL) {
|
||||
const int wild_type = (s->c == Ctrl_P) ? WILD_PREV : WILD_NEXT;
|
||||
if (nextwild(&s->xpc, wild_type, 0, s->firstc != '@') == FAIL) {
|
||||
break;
|
||||
}
|
||||
return command_line_not_changed(s);
|
||||
@@ -2031,9 +2031,9 @@ static int command_line_handle_key(CommandLineState *s)
|
||||
|| s->c == K_KPAGEUP || s->c == K_KPAGEDOWN)) {
|
||||
// If the popup menu is displayed, then PageUp and PageDown
|
||||
// are used to scroll the menu.
|
||||
if (nextwild(&s->xpc,
|
||||
(s->c == K_PAGEUP) ? WILD_PAGEUP : WILD_PAGEDOWN,
|
||||
0, s->firstc != '@') == FAIL) {
|
||||
const int wild_type =
|
||||
(s->c == K_PAGEDOWN || s->c == K_KPAGEDOWN) ? WILD_PAGEDOWN : WILD_PAGEUP;
|
||||
if (nextwild(&s->xpc, wild_type, 0, s->firstc != '@') == FAIL) {
|
||||
break;
|
||||
}
|
||||
return command_line_not_changed(s);
|
||||
|
Reference in New Issue
Block a user