diff options
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 68 |
1 files changed, 9 insertions, 59 deletions
diff --git a/src/option.c b/src/option.c index 8d9b5783f..b625587db 100644 --- a/src/option.c +++ b/src/option.c @@ -83,11 +83,9 @@ #ifdef FEAT_COMMENTS # define PV_COM OPT_BUF(BV_COM) #endif -#ifdef FEAT_INS_EXPAND -# define PV_CPT OPT_BUF(BV_CPT) -# define PV_DICT OPT_BOTH(OPT_BUF(BV_DICT)) -# define PV_TSR OPT_BOTH(OPT_BUF(BV_TSR)) -#endif +#define PV_CPT OPT_BUF(BV_CPT) +#define PV_DICT OPT_BOTH(OPT_BUF(BV_DICT)) +#define PV_TSR OPT_BOTH(OPT_BUF(BV_TSR)) #define PV_CSL OPT_BUF(BV_CSL) #ifdef FEAT_COMPL_FUNC # define PV_CFU OPT_BUF(BV_CFU) @@ -301,9 +299,7 @@ static char_u *p_com; #ifdef FEAT_FOLDING static char_u *p_cms; #endif -#ifdef FEAT_INS_EXPAND static char_u *p_cpt; -#endif #ifdef FEAT_COMPL_FUNC static char_u *p_cfu; static char_u *p_ofu; @@ -850,13 +846,8 @@ static struct vimoption options[] = (char_u *)&p_cp, PV_NONE, {(char_u *)TRUE, (char_u *)FALSE} SCTX_INIT}, {"complete", "cpt", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, -#ifdef FEAT_INS_EXPAND (char_u *)&p_cpt, PV_CPT, {(char_u *)".,w,b,u,t,i", (char_u *)0L} -#else - (char_u *)NULL, PV_NONE, - {(char_u *)0L, (char_u *)0L} -#endif SCTX_INIT}, {"concealcursor","cocu", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF, #ifdef FEAT_CONCEAL @@ -885,13 +876,8 @@ static struct vimoption options[] = #endif SCTX_INIT}, {"completeopt", "cot", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, -#ifdef FEAT_INS_EXPAND (char_u *)&p_cot, PV_NONE, {(char_u *)"menu,preview", (char_u *)0L} -#else - (char_u *)NULL, PV_NONE, - {(char_u *)0L, (char_u *)0L} -#endif SCTX_INIT}, {"completepopup", "cpp", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, #if defined(FEAT_TEXT_PROP) && defined(FEAT_QUICKFIX) @@ -903,7 +889,7 @@ static struct vimoption options[] = #endif SCTX_INIT}, {"completeslash", "csl", P_STRING|P_VI_DEF|P_VIM, -#if defined(FEAT_INS_EXPAND) && defined(BACKSLASH_IN_FILENAME) +#if defined(BACKSLASH_IN_FILENAME) (char_u *)&p_csl, PV_CSL, {(char_u *)"", (char_u *)0L} #else @@ -1023,11 +1009,7 @@ static struct vimoption options[] = (char_u *)&p_deco, PV_NONE, {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, {"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME, -#ifdef FEAT_INS_EXPAND (char_u *)&p_dict, PV_DICT, -#else - (char_u *)NULL, PV_NONE, -#endif {(char_u *)"", (char_u *)0L} SCTX_INIT}, {"diff", NULL, P_BOOL|P_VI_DEF|P_RWIN|P_NOGLOB, #ifdef FEAT_DIFF @@ -2198,18 +2180,10 @@ static struct vimoption options[] = (char_u *)&p_prompt, PV_NONE, {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, {"pumheight", "ph", P_NUM|P_VI_DEF, -#ifdef FEAT_INS_EXPAND (char_u *)&p_ph, PV_NONE, -#else - (char_u *)NULL, PV_NONE, -#endif {(char_u *)0L, (char_u *)0L} SCTX_INIT}, {"pumwidth", "pw", P_NUM|P_VI_DEF, -#ifdef FEAT_INS_EXPAND (char_u *)&p_pw, PV_NONE, -#else - (char_u *)NULL, PV_NONE, -#endif {(char_u *)15L, (char_u *)15L} SCTX_INIT}, {"pythonthreedll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, #if defined(DYNAMIC_PYTHON3) @@ -2796,11 +2770,7 @@ static struct vimoption options[] = (char_u *)&p_tw, PV_TW, {(char_u *)0L, (char_u *)0L} SCTX_INIT}, {"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME, -#ifdef FEAT_INS_EXPAND (char_u *)&p_tsr, PV_TSR, -#else - (char_u *)NULL, PV_NONE, -#endif {(char_u *)"", (char_u *)0L} SCTX_INIT}, {"tildeop", "top", P_BOOL|P_VI_DEF|P_VIM, (char_u *)&p_to, PV_NONE, @@ -3248,11 +3218,9 @@ static char *(p_fdm_values[]) = {"manual", "expr", "marker", "indent", "syntax", NULL}; static char *(p_fcl_values[]) = {"all", NULL}; #endif -#ifdef FEAT_INS_EXPAND static char *(p_cot_values[]) = {"menu", "menuone", "longest", "preview", "popup", "noinsert", "noselect", NULL}; -# ifdef BACKSLASH_IN_FILENAME +#ifdef BACKSLASH_IN_FILENAME static char *(p_csl_values[]) = {"slash", "backslash", NULL}; -# endif #endif #ifdef FEAT_SIGNS static char *(p_scl_values[]) = {"yes", "no", "auto", "number", NULL}; @@ -5794,9 +5762,7 @@ check_buf_options(buf_T *buf) #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT) check_string_option(&buf->b_p_cinw); #endif -#ifdef FEAT_INS_EXPAND check_string_option(&buf->b_p_cpt); -#endif #ifdef FEAT_COMPL_FUNC check_string_option(&buf->b_p_cfu); check_string_option(&buf->b_p_ofu); @@ -5816,10 +5782,8 @@ check_buf_options(buf_T *buf) check_string_option(&buf->b_p_path); check_string_option(&buf->b_p_tags); check_string_option(&buf->b_p_tc); -#ifdef FEAT_INS_EXPAND check_string_option(&buf->b_p_dict); check_string_option(&buf->b_p_tsr); -#endif #ifdef FEAT_LISP check_string_option(&buf->b_p_lw); #endif @@ -7381,7 +7345,6 @@ did_set_string_option( } #endif -#ifdef FEAT_INS_EXPAND /* check if it is a valid value for 'complete' -- Acevedo */ else if (gvarp == &p_cpt) { @@ -7434,7 +7397,7 @@ did_set_string_option( completeopt_was_set(); } -# ifdef BACKSLASH_IN_FILENAME +#ifdef BACKSLASH_IN_FILENAME // 'completeslash' else if (gvarp == &p_csl) { @@ -7442,8 +7405,7 @@ did_set_string_option( || check_opt_strings(curbuf->b_p_csl, p_csl_values, FALSE) != OK) errmsg = e_invarg; } -# endif -#endif // FEAT_INS_EXPAND +#endif #ifdef FEAT_SIGNS // 'signcolumn' @@ -10959,14 +10921,12 @@ unset_global_local_option(char_u *name, void *from) clear_string_option(&buf->b_p_inc); break; #endif -#ifdef FEAT_INS_EXPAND case PV_DICT: clear_string_option(&buf->b_p_dict); break; case PV_TSR: clear_string_option(&buf->b_p_tsr); break; -#endif case PV_FP: clear_string_option(&buf->b_p_fp); break; @@ -11045,10 +11005,8 @@ get_varp_scope(struct vimoption *p, int opt_flags) case PV_DEF: return (char_u *)&(curbuf->b_p_def); case PV_INC: return (char_u *)&(curbuf->b_p_inc); #endif -#ifdef FEAT_INS_EXPAND case PV_DICT: return (char_u *)&(curbuf->b_p_dict); case PV_TSR: return (char_u *)&(curbuf->b_p_tsr); -#endif #if defined(FEAT_BEVAL) && defined(FEAT_EVAL) case PV_BEXPR: return (char_u *)&(curbuf->b_p_bexpr); #endif @@ -11109,12 +11067,10 @@ get_varp(struct vimoption *p) case PV_INC: return *curbuf->b_p_inc != NUL ? (char_u *)&(curbuf->b_p_inc) : p->var; #endif -#ifdef FEAT_INS_EXPAND case PV_DICT: return *curbuf->b_p_dict != NUL ? (char_u *)&(curbuf->b_p_dict) : p->var; case PV_TSR: return *curbuf->b_p_tsr != NUL ? (char_u *)&(curbuf->b_p_tsr) : p->var; -#endif case PV_FP: return *curbuf->b_p_fp != NUL ? (char_u *)&(curbuf->b_p_fp) : p->var; #ifdef FEAT_QUICKFIX @@ -11229,11 +11185,9 @@ get_varp(struct vimoption *p) #ifdef FEAT_FOLDING case PV_CMS: return (char_u *)&(curbuf->b_p_cms); #endif -#ifdef FEAT_INS_EXPAND case PV_CPT: return (char_u *)&(curbuf->b_p_cpt); -# ifdef BACKSLASH_IN_FILENAME +#ifdef BACKSLASH_IN_FILENAME case PV_CSL: return (char_u *)&(curbuf->b_p_csl); -# endif #endif #ifdef FEAT_COMPL_FUNC case PV_CFU: return (char_u *)&(curbuf->b_p_cfu); @@ -11626,11 +11580,9 @@ buf_copy_options(buf_T *buf, int flags) buf->b_p_ml_nobin = p_ml_nobin; buf->b_p_inf = p_inf; buf->b_p_swf = cmdmod.noswapfile ? FALSE : p_swf; -#ifdef FEAT_INS_EXPAND buf->b_p_cpt = vim_strsave(p_cpt); -# ifdef BACKSLASH_IN_FILENAME +#ifdef BACKSLASH_IN_FILENAME buf->b_p_csl = vim_strsave(p_csl); -# endif #endif #ifdef FEAT_COMPL_FUNC buf->b_p_cfu = vim_strsave(p_cfu); @@ -11741,10 +11693,8 @@ buf_copy_options(buf_T *buf, int flags) buf->b_p_inex = vim_strsave(p_inex); # endif #endif -#ifdef FEAT_INS_EXPAND buf->b_p_dict = empty_option; buf->b_p_tsr = empty_option; -#endif #ifdef FEAT_TEXTOBJ buf->b_p_qe = vim_strsave(p_qe); #endif |