summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2022-03-17 13:03:09 +0000
committerBram Moolenaar <Bram@vim.org>2022-03-17 13:03:09 +0000
commit155b0882088ff115dcfb6ce466fe7c8cc2bef349 (patch)
tree4fa09769c8faef9a65c51a84c0e4626885206844 /src/ex_getln.c
parentda6d42c35a68610af872551b03077047258a7551 (diff)
patch 8.2.4585: cannot use keypad page-up/down for completion menuv8.2.4585
Problem: Cannot use keypad page-up/down for completion menu. Solution: Recognize the keypad keys. (Yegappan Lakshmanan, closes #9963)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index c84711ae03..4b149716d4 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1606,6 +1606,7 @@ getcmdline_int(
cmdline_info_T save_ccline;
int did_save_ccline = FALSE;
int cmdline_type;
+ int wild_type;
if (ccline.cmdbuff != NULL)
{
@@ -1867,10 +1868,7 @@ getcmdline_int(
// text.
if (c == Ctrl_E || c == Ctrl_Y)
{
- int wild_type;
-
wild_type = (c == Ctrl_E) ? WILD_CANCEL : WILD_APPLY;
-
if (nextwild(&xpc, wild_type, WILD_NO_BEEP,
firstc != '@') == FAIL)
break;
@@ -2304,8 +2302,8 @@ getcmdline_int(
case Ctrl_P: // previous match
if (xpc.xp_numfiles > 0)
{
- if (nextwild(&xpc, (c == Ctrl_P) ? WILD_PREV : WILD_NEXT,
- 0, firstc != '@') == FAIL)
+ wild_type = (c == Ctrl_P) ? WILD_PREV : WILD_NEXT;
+ if (nextwild(&xpc, wild_type, 0, firstc != '@') == FAIL)
break;
goto cmdline_not_changed;
}
@@ -2325,9 +2323,10 @@ getcmdline_int(
{
// If the popup menu is displayed, then PageUp and PageDown
// are used to scroll the menu.
- if (nextwild(&xpc,
- (c == K_PAGEUP) ? WILD_PAGEUP : WILD_PAGEDOWN,
- 0, firstc != '@') == FAIL)
+ wild_type = WILD_PAGEUP;
+ if (c == K_PAGEDOWN || c == K_KPAGEDOWN)
+ wild_type = WILD_PAGEDOWN;
+ if (nextwild(&xpc, wild_type, 0, firstc != '@') == FAIL)
break;
goto cmdline_not_changed;
}