diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-06-05 20:27:06 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-06-05 20:27:06 +0200 |
commit | 529b9ad62a0e843ee56ef609aef7e51b7dc8a4c8 (patch) | |
tree | d7831186f577859f65e02e53f1300ea66ad65d00 /src/option.c | |
parent | 84d9611b673230a0e1e8fd57423976d30ef36308 (diff) |
patch 9.1.0469: Cannot have buffer-local value for 'completeopt'v9.1.0469
Problem: Cannot have buffer-local value for 'completeopt'
(Nick Jensen).
Solution: Make 'completeopt' global-local (zeertzjq).
Also for some reason test Test_ColonEight_MultiByte seems to be failing
sporadically now. Let's mark it as flaky.
fixes: #5487
closes: #14922
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c index 2acc0d475f..8521c6ed17 100644 --- a/src/option.c +++ b/src/option.c @@ -6224,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; @@ -6333,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 @@ -6413,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 @@ -7205,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 |