Mercurial > vim
comparison src/usercmd.c @ 27187:8950a7b6cc89 v8.2.4122
patch 8.2.4122: ":command Cmd" does not show custom completion argument
Commit: https://github.com/vim/vim/commit/3f3597be3ffa9ae226b2e9831e4ed64c8ae43c42
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 17 19:06:56 2022 +0000
patch 8.2.4122: ":command Cmd" does not show custom completion argument
Problem: ":command Cmd" does not show custom completion argument.
Solution: Show the completion argument when using ":verbose".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 17 Jan 2022 20:15:03 +0100 |
parents | c4b94533559e |
children | 80f2c282ef9c |
comparison
equal
deleted
inserted
replaced
27186:0ef7a05715d3 | 27187:8950a7b6cc89 |
---|---|
546 for (j = 0; command_complete[j].expand != 0; ++j) | 546 for (j = 0; command_complete[j].expand != 0; ++j) |
547 if (command_complete[j].expand == cmd->uc_compl) | 547 if (command_complete[j].expand == cmd->uc_compl) |
548 { | 548 { |
549 STRCPY(IObuff + len, command_complete[j].name); | 549 STRCPY(IObuff + len, command_complete[j].name); |
550 len += (int)STRLEN(IObuff + len); | 550 len += (int)STRLEN(IObuff + len); |
551 if (p_verbose > 0 && cmd->uc_compl_arg != NULL | |
552 && STRLEN(cmd->uc_compl_arg) < 200) | |
553 { | |
554 IObuff[len] = ','; | |
555 STRCPY(IObuff + len + 1, cmd->uc_compl_arg); | |
556 len += (int)STRLEN(IObuff + len); | |
557 } | |
551 break; | 558 break; |
552 } | 559 } |
553 | 560 |
554 do { | 561 do { |
555 IObuff[len++] = ' '; | 562 IObuff[len++] = ' '; |