diff options
Diffstat (limited to '')
-rw-r--r-- | src/option.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/option.c b/src/option.c index 0cd2823..b26c606 100644 --- a/src/option.c +++ b/src/option.c @@ -417,6 +417,14 @@ set_init_xdg_rtp(void) options[opt_idx].def_val[VI_DEFAULT] = xdg_rtp; p_pp = xdg_rtp; +#if defined(XDG_VDIR) && defined(FEAT_SESSION) + if ((opt_idx = findoption((char_u *)"viewdir")) < 0) + goto theend; + + options[opt_idx].def_val[VI_DEFAULT] = (char_u *)XDG_VDIR; + p_vdir = (char_u *)XDG_VDIR; +#endif + theend: vim_free(vimrc1); vim_free(vimrc2); @@ -6216,6 +6224,10 @@ unset_global_local_option(char_u *name, void *from) clear_string_option(&buf->b_p_inc); break; # endif + case PV_COT: + clear_string_option(&buf->b_p_cot); + buf->b_cot_flags = 0; + break; case PV_DICT: clear_string_option(&buf->b_p_dict); break; @@ -6325,6 +6337,7 @@ get_varp_scope(struct vimoption *p, int scope) case PV_DEF: return (char_u *)&(curbuf->b_p_def); case PV_INC: return (char_u *)&(curbuf->b_p_inc); #endif + case PV_COT: return (char_u *)&(curbuf->b_p_cot); case PV_DICT: return (char_u *)&(curbuf->b_p_dict); case PV_TSR: return (char_u *)&(curbuf->b_p_tsr); #ifdef FEAT_COMPL_FUNC @@ -6405,6 +6418,8 @@ get_varp(struct vimoption *p) case PV_INC: return *curbuf->b_p_inc != NUL ? (char_u *)&(curbuf->b_p_inc) : p->var; #endif + case PV_COT: return *curbuf->b_p_cot != NUL + ? (char_u *)&(curbuf->b_p_cot) : p->var; 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 @@ -7197,6 +7212,8 @@ buf_copy_options(buf_T *buf, int flags) COPY_OPT_SCTX(buf, BV_INEX); # endif #endif + buf->b_p_cot = empty_option; + buf->b_cot_flags = 0; buf->b_p_dict = empty_option; buf->b_p_tsr = empty_option; #ifdef FEAT_COMPL_FUNC @@ -8347,10 +8364,10 @@ get_sidescrolloff_value(void) } /* - * Get the local or global value of 'backupcopy'. + * Get the local or global value of 'backupcopy' flags. */ unsigned int -get_bkc_value(buf_T *buf) +get_bkc_flags(buf_T *buf) { return buf->b_bkc_flags ? buf->b_bkc_flags : bkc_flags; } @@ -8369,7 +8386,7 @@ get_flp_value(buf_T *buf) #endif /* - * Get the local or global value of the 'virtualedit' flags. + * Get the local or global value of 'virtualedit' flags. */ unsigned int get_ve_flags(void) |