To: vim_dev@googlegroups.com Subject: Patch 8.2.4122 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4122 Problem: ":command Cmd" does not show custom completion argument. Solution: Show the completion argument when using ":verbose". Files: src/usercmd.c, src/testdir/test_usercommands.vim *** ../vim-8.2.4121/src/usercmd.c 2022-01-16 21:54:14.986234897 +0000 --- src/usercmd.c 2022-01-17 18:55:41.682591297 +0000 *************** *** 548,553 **** --- 548,560 ---- { STRCPY(IObuff + len, command_complete[j].name); len += (int)STRLEN(IObuff + len); + if (p_verbose > 0 && cmd->uc_compl_arg != NULL + && STRLEN(cmd->uc_compl_arg) < 200) + { + IObuff[len] = ','; + STRCPY(IObuff + len + 1, cmd->uc_compl_arg); + len += (int)STRLEN(IObuff + len); + } break; } *** ../vim-8.2.4121/src/testdir/test_usercommands.vim 2021-12-15 17:53:36.364946447 +0000 --- src/testdir/test_usercommands.vim 2022-01-17 19:05:44.730151238 +0000 *************** *** 589,598 **** \ execute('command DoCmd')) " Test output in verbose mode. ! command! DoCmd : call assert_match("^\n" \ .. " Name Args Address Complete Definition\n" ! \ .. " DoCmd 0 :\n" \ .. "\tLast set from .*/test_usercommands.vim line \\d\\+$", \ execute('verbose command DoCmd')) --- 589,598 ---- \ execute('command DoCmd')) " Test output in verbose mode. ! command! -nargs=+ -complete=customlist,SomeFunc DoCmd :ls call assert_match("^\n" \ .. " Name Args Address Complete Definition\n" ! \ .. " DoCmd + customlist,SomeFunc :ls\n" \ .. "\tLast set from .*/test_usercommands.vim line \\d\\+$", \ execute('verbose command DoCmd')) *** ../vim-8.2.4121/src/version.c 2022-01-17 17:52:18.107986971 +0000 --- src/version.c 2022-01-17 18:57:45.814503280 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4122, /**/ -- Witches prefer brooms: vacuum-cleaners need extension cords! /// 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 ///