vim-patch:9.0.2025: no cmdline completion for ++opt args (#25657)

Problem:  no cmdline completion for ++opt args
Solution: Add cmdline completion for :e ++opt=arg and :terminal
          [++options]

closes: vim/vim#13319

989426be6e

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
This commit is contained in:
zeertzjq
2023-10-15 17:52:08 +08:00
committed by GitHub
parent d974a3dcbb
commit 75b488d3ef
6 changed files with 176 additions and 8 deletions

View File

@@ -1490,6 +1490,17 @@ int expand_set_fileformat(optexpand_T *args, int *numMatches, char ***matches)
matches);
}
/// Function given to ExpandGeneric() to obtain the possible arguments of the
/// fileformat options.
char *get_fileformat_name(expand_T *xp FUNC_ATTR_UNUSED, int idx)
{
if (idx >= (int)ARRAY_SIZE(p_ff_values)) {
return NULL;
}
return p_ff_values[idx];
}
/// The 'fileformats' option is changed.
const char *did_set_fileformats(optset_T *args)
{