0
0
mirror of https://github.com/vim/vim.git synced 2025-10-17 07:44:28 -04:00

patch 9.0.1242: code for :runtime completion is not consistent

Problem:    Code for :runtime completion is not consistent.
Solution:   Make code for cmdline expansion more consistent. (closes #11875)
This commit is contained in:
zeertzjq
2023-01-25 15:04:22 +00:00
committed by Bram Moolenaar
parent b582010350
commit b0d45ec67f
5 changed files with 19 additions and 17 deletions

View File

@@ -6713,14 +6713,14 @@ ExpandSettings(
}
int
ExpandOldSetting(int *num_file, char_u ***file)
ExpandOldSetting(int *numMatches, char_u ***matches)
{
char_u *var = NULL; // init for GCC
char_u *buf;
*num_file = 0;
*file = ALLOC_ONE(char_u *);
if (*file == NULL)
*numMatches = 0;
*matches = ALLOC_ONE(char_u *);
if (*matches == NULL)
return FAIL;
/*
@@ -6748,7 +6748,7 @@ ExpandOldSetting(int *num_file, char_u ***file)
if (buf == NULL)
{
VIM_CLEAR(*file);
VIM_CLEAR(*matches);
return FAIL;
}
@@ -6764,8 +6764,8 @@ ExpandOldSetting(int *num_file, char_u ***file)
STRMOVE(var, var + 1);
#endif
*file[0] = buf;
*num_file = 1;
*matches[0] = buf;
*numMatches = 1;
return OK;
}