To: vim_dev@googlegroups.com Subject: Patch 8.2.4585 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4585 Problem: Cannot use keypad page-up/down for completion menu. Solution: Recognize the keypad keys. (Yegappan Lakshmanan, closes #9963) Files: src/ex_getln.c, src/testdir/test_cmdline.vim *** ../vim-8.2.4584/src/ex_getln.c 2022-03-16 13:33:22.074467978 +0000 --- src/ex_getln.c 2022-03-17 13:00:03.943939278 +0000 *************** *** 1606,1611 **** --- 1606,1612 ---- cmdline_info_T save_ccline; int did_save_ccline = FALSE; int cmdline_type; + int wild_type; if (ccline.cmdbuff != NULL) { *************** *** 1867,1876 **** // 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; --- 1868,1874 ---- *************** *** 2304,2311 **** case Ctrl_P: // previous match if (xpc.xp_numfiles > 0) { ! if (nextwild(&xpc, (c == Ctrl_P) ? WILD_PREV : WILD_NEXT, ! 0, firstc != '@') == FAIL) break; goto cmdline_not_changed; } --- 2302,2309 ---- case Ctrl_P: // previous match if (xpc.xp_numfiles > 0) { ! wild_type = (c == Ctrl_P) ? WILD_PREV : WILD_NEXT; ! if (nextwild(&xpc, wild_type, 0, firstc != '@') == FAIL) break; goto cmdline_not_changed; } *************** *** 2325,2333 **** { // 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) break; goto cmdline_not_changed; } --- 2323,2332 ---- { // If the popup menu is displayed, then PageUp and PageDown // are used to scroll the menu. ! 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; } *** ../vim-8.2.4584/src/testdir/test_cmdline.vim 2022-03-17 11:46:51.651820164 +0000 --- src/testdir/test_cmdline.vim 2022-03-17 13:00:03.943939278 +0000 *************** *** 2106,2112 **** endfunc " Test for recalling newer or older cmdline from history with , , ! " , , , , , or . func Test_recalling_cmdline() CheckFeature cmdline_hist --- 2106,2113 ---- endfunc " Test for recalling newer or older cmdline from history with , , ! " , , , , , , , or ! " . func Test_recalling_cmdline() CheckFeature cmdline_hist *************** *** 2114,2130 **** cnoremap (save-cmdline) let g:cmdlines += [getcmdline()] let histories = [ ! \ {'name': 'cmd', 'enter': ':', 'exit': "\"}, ! \ {'name': 'search', 'enter': '/', 'exit': "\"}, ! \ {'name': 'expr', 'enter': ":\=", 'exit': "\\"}, ! \ {'name': 'input', 'enter': ":call input('')\", 'exit': "\"}, "\ TODO: {'name': 'debug', ...} \] let keypairs = [ ! \ {'older': "\", 'newer': "\", 'prefixmatch': v:true}, ! \ {'older': "\", 'newer': "\", 'prefixmatch': v:false}, ! \ {'older': "\", 'newer': "\", 'prefixmatch': v:false}, ! \ {'older': "\", 'newer': "\", 'prefixmatch': v:false}, \] let prefix = 'vi' for h in histories --- 2115,2132 ---- cnoremap (save-cmdline) let g:cmdlines += [getcmdline()] let histories = [ ! \ #{name: 'cmd', enter: ':', exit: "\"}, ! \ #{name: 'search', enter: '/', exit: "\"}, ! \ #{name: 'expr', enter: ":\=", exit: "\\"}, ! \ #{name: 'input', enter: ":call input('')\", exit: "\"}, "\ TODO: {'name': 'debug', ...} \] let keypairs = [ ! \ #{older: "\", newer: "\", prefixmatch: v:true}, ! \ #{older: "\", newer: "\", prefixmatch: v:false}, ! \ #{older: "\", newer: "\", prefixmatch: v:false}, ! \ #{older: "\", newer: "\", prefixmatch: v:false}, ! \ #{older: "\", newer: "\", prefixmatch: v:false}, \] let prefix = 'vi' for h in histories *** ../vim-8.2.4584/src/version.c 2022-03-17 11:46:51.651820164 +0000 --- src/version.c 2022-03-17 13:01:19.683738771 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4585, /**/ -- He was not in the least bit scared to be mashed into a pulp Or to have his eyes gouged out and his elbows broken; To have his kneecaps split and his body burned away And his limbs all hacked and mangled, brave Sir Robin. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///