vim-patch:8.2.0925: getcompletion() does not return command line arguments

Problem:    Getcompletion() does not return command line arguments.
Solution:   Add the "cmdline" option. (Shougo, closes vim/vim#1140)
1f1fd44ef7
This commit is contained in:
Jan Edmund Lazo
2021-02-13 19:16:47 -05:00
parent e87c30a196
commit 147d40f2a0
4 changed files with 22 additions and 11 deletions

View File

@@ -6282,14 +6282,14 @@ int parse_compl_arg(const char_u *value, int vallen, int *complp,
return OK;
}
int cmdcomplete_str_to_type(char_u *complete_str)
int cmdcomplete_str_to_type(const char *complete_str)
{
for (int i = 0; i < (int)(ARRAY_SIZE(command_complete)); i++) {
char *cmd_compl = get_command_complete(i);
if (cmd_compl == NULL) {
continue;
}
if (STRCMP(complete_str, command_complete[i]) == 0) {
if (strcmp(complete_str, command_complete[i]) == 0) {
return i;
}
}