vim-patch:9.0.1520: completion for option name includes all bool options (#23518)

Problem:    Completion for option name includes all bool options.
Solution:   Do not recognize the "noinv" prefix.  Prefix "no" or "inv" when
            appropriate.

048d9d2521

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-05-07 08:00:08 +08:00
committed by GitHub
parent 9e34aa76c1
commit fa1baa9a47
4 changed files with 34 additions and 6 deletions

View File

@@ -222,11 +222,18 @@ struct exarg {
#define EXFLAG_NR 0x02 // '#': number
#define EXFLAG_PRINT 0x04 // 'p': print
typedef enum {
XP_PREFIX_NONE, ///< prefix not used
XP_PREFIX_NO, ///< "no" prefix for bool option
XP_PREFIX_INV, ///< "inv" prefix for bool option
} xp_prefix_T;
// used for completion on the command line
struct expand {
char *xp_pattern; // start of item to expand
int xp_context; // type of expansion
size_t xp_pattern_len; // bytes in xp_pattern before cursor
xp_prefix_T xp_prefix;
char *xp_arg; // completion function
LuaRef xp_luaref; // Ref to Lua completion function
sctx_T xp_script_ctx; // SCTX for completion function