feat(complete): support f flag for complete buffer part

This commit is contained in:
glepnir
2023-10-13 14:49:01 +08:00
parent 195301c609
commit ae4ca4edf8
7 changed files with 66 additions and 2 deletions

View File

@@ -1171,7 +1171,7 @@ const char *did_set_complete(optset_T *args)
if (!*s) {
break;
}
if (vim_strchr(".wbuksid]tU", (uint8_t)(*s)) == NULL) {
if (vim_strchr(".wbuksid]tUf", (uint8_t)(*s)) == NULL) {
return illegal_char(args->os_errbuf, args->os_errbuflen, (uint8_t)(*s));
}
if (*++s != NUL && *s != ',' && *s != ' ') {
@@ -1200,7 +1200,7 @@ const char *did_set_complete(optset_T *args)
int expand_set_complete(optexpand_T *args, int *numMatches, char ***matches)
{
static char *(p_cpt_values[]) = {
".", "w", "b", "u", "k", "kspell", "s", "i", "d", "]", "t", "U", NULL
".", "w", "b", "u", "k", "kspell", "s", "i", "d", "]", "t", "U", "f", NULL
};
return expand_set_opt_string(args,
p_cpt_values,