0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.2025: no cmdline completion for ++opt args

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

closes: #13319

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
This commit is contained in:
Yee Cheng Chin
2023-10-14 11:46:51 +02:00
committed by Christian Brabandt
parent bd734c3bea
commit 989426be6e
12 changed files with 335 additions and 8 deletions

View File

@@ -2104,6 +2104,19 @@ expand_set_fileformat(optexpand_T *args, int *numMatches, char_u ***matches)
matches);
}
/*
* Function given to ExpandGeneric() to obtain the possible arguments of the
* fileformat options.
*/
char_u *
get_fileformat_name(expand_T *xp UNUSED, int idx)
{
if (idx >= (int)ARRAY_LENGTH(p_ff_values))
return NULL;
return (char_u*)p_ff_values[idx];
}
/*
* The 'fileformats' option is changed.
*/