diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-05-06 22:21:11 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-05-06 22:21:11 +0100 |
commit | 048d9d25214049dfde04c468c14bd1708fb692b8 (patch) | |
tree | 5e902e2b54814aa8df9c582b73eb564e0b28d5c0 /src/option.c | |
parent | 0b70aeb49d6dfd1879162f202150cb1ed5f024ad (diff) |
patch 9.0.1520: completion for option name includes all bool optionsv9.0.1520
Problem: Completion for option name includes all bool options.
Solution: Do not recognize the "noinv" prefix. Prefix "no" or "inv" when
appropriate.
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/option.c b/src/option.c index 1a9ba2534a..e5e78d823f 100644 --- a/src/option.c +++ b/src/option.c @@ -7265,11 +7265,13 @@ set_context_in_set_cmd( if (STRNCMP(p, "no", 2) == 0 && STRNCMP(p, "novice", 6) != 0) { xp->xp_context = EXPAND_BOOL_SETTINGS; + xp->xp_prefix = XP_PREFIX_NO; p += 2; } - if (STRNCMP(p, "inv", 3) == 0) + else if (STRNCMP(p, "inv", 3) == 0) { xp->xp_context = EXPAND_BOOL_SETTINGS; + xp->xp_prefix = XP_PREFIX_INV; p += 3; } xp->xp_pattern = arg = p; @@ -7528,7 +7530,7 @@ ExpandSettings( if (options[opt_idx].var == NULL) continue; if (xp->xp_context == EXPAND_BOOL_SETTINGS - && !(options[opt_idx].flags & P_BOOL)) + && !(options[opt_idx].flags & P_BOOL)) continue; is_term_opt = istermoption_idx(opt_idx); if (is_term_opt && num_normal > 0) @@ -7600,7 +7602,7 @@ ExpandSettings( name_buf[4] = NUL; if (match_str(name_buf, regmatch, *matches, count, - (loop == 0), fuzzy, fuzzystr, fuzmatch)) + (loop == 0), fuzzy, fuzzystr, fuzmatch)) { if (loop == 0) num_term++; |