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 -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220117190803.7A39C1C04D4%40moolenaar.net.