diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-01-25 15:04:22 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-01-25 15:04:22 +0000 |
commit | b0d45ec67f4976318f199a7929ad3bcf93686fd0 (patch) | |
tree | f3e8c92e790367c6f4886da4cc48e94bff4fe2f8 /src/option.c | |
parent | b58201035060d223d4d795ef9c3bc6b171eee9af (diff) |
patch 9.0.1242: code for :runtime completion is not consistentv9.0.1242
Problem: Code for :runtime completion is not consistent.
Solution: Make code for cmdline expansion more consistent. (closes #11875)
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/option.c b/src/option.c index 386cf4d3c3..528be65aac 100644 --- a/src/option.c +++ b/src/option.c @@ -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; } |